From 701a32d048f15abe6178032af4a8932b468c2e27 Mon Sep 17 00:00:00 2001 From: tron Date: Mon, 7 Feb 2005 12:32:35 +0000 Subject: (svn r1840) Repel str_buffr and use local buffers where possible --- misc_gui.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'misc_gui.c') 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) { -- cgit v1.2.3-54-g00ecf