summaryrefslogtreecommitdiff
path: root/src/signs_gui.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-10-22 19:12:10 +0000
committersmatz <smatz@openttd.org>2008-10-22 19:12:10 +0000
commitc10f7db5760594b1166872746eb0769232ed7b77 (patch)
tree43f6f4d436dced1e168f6a66c84f0027a6db24bd /src/signs_gui.cpp
parent6bc0f0ef922c316d2a5de4f3ee9c70e4cc7131de (diff)
downloadopenttd-c10f7db5760594b1166872746eb0769232ed7b77.tar.xz
(svn r14514) -Codechange: use 'size' instead of 'length' for querystring and textbuf, explicitly say it includes the terminating zero
-Fix: one couldn't rename things with too long default/automatic name -Fix: buffer overflow in console when too long (1024 bytes) command was entered
Diffstat (limited to 'src/signs_gui.cpp')
-rw-r--r--src/signs_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp
index 714299f62..925092e00 100644
--- a/src/signs_gui.cpp
+++ b/src/signs_gui.cpp
@@ -215,7 +215,7 @@ struct SignWindow : QueryStringBaseWindow, SignList {
void UpdateSignEditWindow(const Sign *si)
{
- char *last_of = &this->edit_str_buf[this->edit_str_size - 1];
+ char *last_of = &this->edit_str_buf[this->edit_str_size - 1]; // points to terminating '\0'
/* Display an empty string when the sign hasnt been edited yet */
if (si->name != NULL) {