aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/qregisters.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2014-02-18 17:41:29 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2014-02-18 17:41:29 +0100
commit793f801a5ccc76645e569adb971eeced67e763be (patch)
tree3c095a73a0d16b890fe0e8fe6dfce86190501410 /src/qregisters.cpp
parent0674f295767f2e953baf2eec13cdd4be52468ca1 (diff)
downloadsciteco-793f801a5ccc76645e569adb971eeced67e763be.tar.gz
removed unreliable CHR2STR() macro
* referencing temporaries is unreliable/buggy in GNU C++, at least since v4.7 * in higher optimization levels it resulted in massive memory corruptions * this is responsible for the build issues (PPA build issues) * instead, always declare a buffer on the stack which guarantees that the variable lives long enough * the g_strdup(CHR2STR(x)) idiom has been replaced with String::chrdup(x)
Diffstat (limited to 'src/qregisters.cpp')
-rw-r--r--src/qregisters.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qregisters.cpp b/src/qregisters.cpp
index 1794dbd..f0d56a5 100644
--- a/src/qregisters.cpp
+++ b/src/qregisters.cpp
@@ -377,7 +377,7 @@ MICROSTATE_START;
case '#': set(&&StateFirstChar); break;
case '{': set(&&StateString); break;
default:
- undo.push_str(name) = g_strdup(CHR2STR(g_ascii_toupper(chr)));
+ undo.push_str(name) = String::chrdup(g_ascii_toupper(chr));
goto done;
}