summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/game_text.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/game_text.cpp b/src/game/game_text.cpp
index bfff460ae..1717dcf9a 100644
--- a/src/game/game_text.cpp
+++ b/src/game/game_text.cpp
@@ -66,7 +66,7 @@ void NORETURN CDECL strgen_fatal(const char *s, ...)
*/
LanguageStrings::LanguageStrings(const char *language, const char *end)
{
- this->language = stredup(language, end - 1);
+ this->language = stredup(language, end != NULL ? end - 1 : NULL);
}
/** Free everything. */