Changeset - r7810:36ef334ff30e
[Not reviewed]
master
0 1 0
rubidium - 17 years ago 2007-10-30 18:32:26
rubidium@openttd.org
(svn r11360) -Fix [FS#1375]: do not crash when trying to "draw" an invalid string, just draw a message saying it is invalid.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/strings.cpp
Show inline comments
 
@@ -116,12 +116,12 @@ static const char *GetStringPtr(StringID
 
 */
 
static char *GetStringWithArgs(char *buffr, uint string, const int64 *argv, const char* last)
 
{
 
	if (GB(string, 0, 16) == 0) return GetStringWithArgs(buffr, STR_UNDEFINED, argv, last);
 

	
 
	uint index = GB(string,  0, 11);
 
	uint tab   = GB(string, 11,  5);
 
	char buff[512];
 

	
 
	if (GB(string, 0, 16) == 0) error("!invalid string id 0 in GetString");
 

	
 
	switch (tab) {
 
		case 4:
 
			if (index >= 0xC0)
0 comments (0 inline, 0 general)