fix string escaping for SVARs

* avoid double richtext conversion for mspmsg
* fix minor memleak in pushident()
* always escape strings for the command buffer
This commit is contained in:
ac-stef
2015-02-23 20:12:47 +01:00
parent d585550315
commit 8153813c14
4 changed files with 10 additions and 9 deletions
+2 -3
View File
@@ -300,7 +300,7 @@ void saycommand(char *init) // turns input to the comman
setscope(false);
setburst(false);
if(!editmode) keyrepeat(saycommandon);
copystring(cmdline.buf, init ? init : "");
copystring(cmdline.buf, init ? escapestring(init, false, true) : "");
DELETEA(cmdaction);
DELETEA(cmdprompt);
cmdline.pos = -1;
@@ -322,8 +322,7 @@ SVARFF(mapmsg,
},
{ // set new mapmsg
string text;
filterrichtext(text, mapmsg);
filtertext(text, text, FTXT__MAPMSG);
filtertext(text, mapmsg, FTXT__MAPMSG);
copystring(hdr.maptitle, text, 128);
if(editmode) unsavededits++;
});