diff options
author | tron <tron@openttd.org> | 2005-02-07 12:32:35 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-02-07 12:32:35 +0000 |
commit | b1baa4ed8bdfa43d5476da039afd71a424e56c7f (patch) | |
tree | be7740f774b1ed3f982c4e22c30d2277fa57e228 /misc_gui.c | |
parent | f8d97a5f616c5e303b2822316fcef409baee6195 (diff) | |
download | openttd-b1baa4ed8bdfa43d5476da039afd71a424e56c7f.tar.xz |
(svn r1840) Repel str_buffr and use local buffers where possible
Diffstat (limited to 'misc_gui.c')
-rw-r--r-- | misc_gui.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/misc_gui.c b/misc_gui.c index d6dacc454..5fa581367 100644 --- a/misc_gui.c +++ b/misc_gui.c @@ -631,6 +631,7 @@ static void TooltipsWndProc(Window *w, WindowEvent *e) void GuiShowTooltips(StringID string_id) { + char buffer[512]; Window *w; int right,bottom; int x,y; @@ -645,10 +646,9 @@ void GuiShowTooltips(StringID string_id) DeleteWindow(w); } - GetString(str_buffr, string_id); - assert(strlen(str_buffr) < sizeof(str_buffr) - 1); + GetString(buffer, string_id); - right = GetStringWidth(str_buffr) + 4; + right = GetStringWidth(buffer) + 4; bottom = 14; if (right > 200) { |