main_gui.c
changeset 1336 c9e6b766bf21
parent 1329 a8a0d60b0a8e
child 1349 07514c2cc6d1
equal deleted inserted replaced
1335:a635854c23b6 1336:c9e6b766bf21
  2099 extern GetNewsStringCallbackProc * const _get_news_string_callback[];
  2099 extern GetNewsStringCallbackProc * const _get_news_string_callback[];
  2100 
  2100 
  2101 
  2101 
  2102 static bool DrawScrollingStatusText(NewsItem *ni, int pos)
  2102 static bool DrawScrollingStatusText(NewsItem *ni, int pos)
  2103 {
  2103 {
       
  2104 	char buf[512];
  2104 	StringID str;
  2105 	StringID str;
  2105 	const char *s;
  2106 	const char *s;
  2106 	char *d;
  2107 	char *d;
  2107 	DrawPixelInfo tmp_dpi, *old_dpi;
  2108 	DrawPixelInfo tmp_dpi, *old_dpi;
  2108 	int x;
  2109 	int x;
  2113 	} else {
  2114 	} else {
  2114 		COPY_IN_DPARAM(0, ni->params, lengthof(ni->params));
  2115 		COPY_IN_DPARAM(0, ni->params, lengthof(ni->params));
  2115 		str = ni->string_id;
  2116 		str = ni->string_id;
  2116 	}
  2117 	}
  2117 
  2118 
  2118 	GetString(str_buffr, str);
  2119 	GetString(buf, str);
  2119 	assert(strlen(str_buffr) < sizeof(str_buffr) - 1);
  2120 
  2120 
  2121 	s = buf;
  2121 	s = str_buffr;
       
  2122 	d = buffer;
  2122 	d = buffer;
  2123 
  2123 
  2124 	for(;;s++) {
  2124 	for(;;s++) {
  2125 		if (*s == 0) {
  2125 		if (*s == 0) {
  2126 			*d = 0;
  2126 			*d = 0;