From d5e0be7d7fc5a0ad763f633c2b849547321c7081 Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 21 Jan 2012 13:21:33 +0000 Subject: [PATCH] (svn r23829) -Fix [FS#4996]: Loading empty GS strings/translations failed. --- src/saveload/game_sl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/saveload/game_sl.cpp b/src/saveload/game_sl.cpp index 55414cc31c..d5a454f480 100644 --- a/src/saveload/game_sl.cpp +++ b/src/saveload/game_sl.cpp @@ -151,7 +151,7 @@ static void Load_GSTR() LanguageStrings *ls = new LanguageStrings(_game_saveload_string); for (uint i = 0; i < _game_saveload_strings; i++) { SlObject(NULL, _game_language_string); - *ls->lines.Append() = strdup(_game_saveload_string); + *ls->lines.Append() = strdup(_game_saveload_string != NULL ? _game_saveload_string : ""); } *_current_data->raw_strings.Append() = ls;