diff options
-rw-r--r-- | src/strings.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/strings.cpp b/src/strings.cpp index 1e6a0be99..cfeb93b16 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -889,11 +889,11 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg sub_args.SetParam(i++, (uint64)(size_t)g); } } - /* We error'd out in the while, to error out in themain too */ - if (*str == '\0') break; - - str = p; - buff = GetStringWithArgs(buff, (GAME_TEXT_TAB << TAB_COUNT_OFFSET) + stringid, &sub_args, last, true); + /* If we didn't error out, we can actually print the string. */ + if (*str != '\0') { + str = p; + buff = GetStringWithArgs(buff, (GAME_TEXT_TAB << TAB_COUNT_OFFSET) + stringid, &sub_args, last, true); + } for (int i = 0; i < 20; i++) { if (sub_args_need_free[i]) free((void *)sub_args.GetParam(i)); |