From 4bc04886f656e6d227d4e4754e3ba95acb4173dc Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Wed, 11 Feb 2015 20:34:18 -0500 Subject: [PATCH] Fix use of pointer arithmetic where string concatenation was intended --- src/dialogxml/control.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/dialogxml/control.cpp b/src/dialogxml/control.cpp index 0b18acf66..4c0840e42 100644 --- a/src/dialogxml/control.cpp +++ b/src/dialogxml/control.cpp @@ -247,9 +247,10 @@ void cControl::setTextToKey(){ unsigned char c = key.c; if(key.mod - mod_shift != key.mod) c = applyShift(c); else c = removeShift(c); - if(key.mod - mod_ctrl != key.mod) lbl = "^" + c; - else if(key.mod - mod_alt != key.mod) lbl = "*" + c; - else lbl = c; + lbl.clear(); + if(key.mod - mod_ctrl != key.mod) lbl += '^'; + else if(key.mod - mod_alt != key.mod) lbl = '*'; + lbl += c; } if(isVisible()) draw(); }