summaryrefslogtreecommitdiff
path: root/src/highscore.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-06-29 12:09:55 +0000
committerrubidium <rubidium@openttd.org>2013-06-29 12:09:55 +0000
commitbdb62c14e2e7f2ce66aa538f5bed209b6b464cc3 (patch)
tree1a1bf98628f802657fa93693f92e06d6088439eb /src/highscore.cpp
parent66b7123ed91113d147f01206b36a2c8be683c17f (diff)
downloadopenttd-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.cpp2
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);
}
}