summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/game_text.cpp2
-rw-r--r--src/script/script_config.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/game/game_text.cpp b/src/game/game_text.cpp
index 1717dcf9a..83dc9a604 100644
--- a/src/game/game_text.cpp
+++ b/src/game/game_text.cpp
@@ -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, '.');
diff --git a/src/script/script_config.cpp b/src/script/script_config.cpp
index 95e278954..768ff5e21 100644
--- a/src/script/script_config.cpp
+++ b/src/script/script_config.cpp
@@ -197,10 +197,10 @@ void ScriptConfig::SettingsToString(char *string, const char *last) const
/* 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. */