(svn r1840) Repel str_buffr and use local buffers where possible

This commit is contained in:
tron
2005-02-07 12:32:35 +00:00
parent f8d97a5f61
commit b1baa4ed8b
7 changed files with 35 additions and 30 deletions

View File

@@ -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) {