Changeset - r21406:a92ce8024212
[Not reviewed]
master
0 2 0
frosch - 10 years ago 2014-04-24 19:09:17
frosch@openttd.org
(svn r26505) -Fix (r23634, r26493): Incorrect usage of strecpy/strecat
2 files changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/game/game_text.cpp
Show inline comments
 
@@ -379,7 +379,7 @@ void ReconsiderGameScriptLanguage()
 
	if (_current_data == NULL) return;
 

	
 
	char temp[MAX_PATH];
 
	strecpy(temp, _current_language->file, temp + sizeof(temp));
 
	strecpy(temp, _current_language->file, lastof(temp));
 

	
 
	/* Remove the extension */
 
	char *l = strrchr(temp, '.');
src/script/script_config.cpp
Show inline comments
 
@@ -197,10 +197,10 @@ void ScriptConfig::SettingsToString(char
 
		/* If it doesn't fit, skip the next settings */
 
		if (string + needed_size > last) break;
 

	
 
		s = strecat(s, last, (*it).first);
 
		s = strecat(s, last, "=");
 
		s = strecat(s, last, no);
 
		s = strecat(s, last, ",");
 
		s = strecat(s, (*it).first, last);
 
		s = strecat(s, "=", last);
 
		s = strecat(s, no, last);
 
		s = strecat(s, ",", last);
 
	}
 

	
 
	/* Remove the last ',', but only if at least one setting was saved. */
0 comments (0 inline, 0 general)