Changeset - r10836:2daa1e2f98f5
[Not reviewed]
master
0 1 0
Yexo - 16 years ago 2009-01-20 15:58:40
yexo@openttd.org
(svn r15171) -Fix (r15027): Buffer underflow in case there are no settings to save for an AI.
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/ai/ai_config.cpp
Show inline comments
 
@@ -208,5 +208,7 @@ void AIConfig::SettingsToString(char *st
 
		strcat(string, no);
 
		strcat(string, ",");
 
	}
 
	string[strlen(string) - 1] = '\0';
 
	/* Remove the last ',', but only if at least one setting was saved. */
 
	size_t len = strlen(string);
 
	if (len > 0) string[len - 1] = '\0';
 
}
0 comments (0 inline, 0 general)