diff options
author | rubidium <rubidium@openttd.org> | 2013-06-29 12:09:55 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-06-29 12:09:55 +0000 |
commit | bdb62c14e2e7f2ce66aa538f5bed209b6b464cc3 (patch) | |
tree | 1a1bf98628f802657fa93693f92e06d6088439eb /src/highscore.cpp | |
parent | 66b7123ed91113d147f01206b36a2c8be683c17f (diff) | |
download | openttd-bdb62c14e2e7f2ce66aa538f5bed209b6b464cc3.tar.xz |
(svn r25513) -Fix [FS#5623]: the high score's company/president name was stored with encoded string codes, causing it to cause trouble when the encoding of the string codes changes. Furthermore, check the incoming dangerous content better
Diffstat (limited to 'src/highscore.cpp')
-rw-r--r-- | src/highscore.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/highscore.cpp b/src/highscore.cpp index 0a38acf2e..2ce2d9bda 100644 --- a/src/highscore.cpp +++ b/src/highscore.cpp @@ -172,7 +172,7 @@ void LoadFromHighScore() i = SP_SAVED_HIGHSCORE_END; break; } - *lastof(hs->company) = '\0'; + str_validate(hs->company, lastof(hs->company), SVS_NONE); hs->title = EndGameGetPerformanceTitleFromValue(hs->score); } } |