diff options
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/saveload.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index 74274c1f4..1eb6da59c 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -1086,6 +1086,7 @@ static void SlString(void *ptr, size_t length, VarType conv) free(*(char **)ptr); if (len == 0) { *(char **)ptr = NULL; + return; } else { *(char **)ptr = MallocT<char>(len + 1); // terminating '\0' ptr = *(char **)ptr; |