Fix #317 crash on viewing news items caused by double pointer de ref and reuse of same pointers.

This commit is contained in:
Duncan Frost committed 2014-08-19 19:34:31 +01:00
1 parent e9665e22df
commit 3df3ff4d1c
1 file changed
+4 -2
+4 -2
View File
@@ -333,9 +333,11 @@ static void window_news_scrollpaint()
gfx_draw_string_left(dpi, 2235, (void*)0x013CE952, 2, 4, y);
// Item text
char *sz = (char*)0x013CE952;
char sz[400];// = (char*)0x09B5F2C;
char* args[1];
args[0] = &sz;
sprintf(sz, "%c%c%s", newsItem->colour, FORMAT_SMALLFONT, newsItem->text);
gfx_draw_string_left_wrapped(dpi, &sz, 2, y + 10, 325, 1170, 14);
gfx_draw_string_left_wrapped(dpi, args, 2, y + 10, 325, 1170, 14);
// Subject button
if ((RCT2_ADDRESS(0x0097BE7C, uint8)[newsItem->type] & 2) && !(newsItem->flags & 1)) {