summaryrefslogtreecommitdiff
path: root/players.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-02-06 22:25:27 +0000
committertron <tron@openttd.org>2005-02-06 22:25:27 +0000
commiteed181245dffbc04a2e527e8e7cccf44ce4fda86 (patch)
treef2cd6e89c719cd0e1e1f5f36d8b3e1bcb804079f /players.c
parent27dc506a0313993c8e7dc4acf77da9649d362a58 (diff)
downloadopenttd-eed181245dffbc04a2e527e8e7cccf44ce4fda86.tar.xz
(svn r1833) byte -> char transition: the rest
Diffstat (limited to 'players.c')
-rw-r--r--players.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/players.c b/players.c
index 040f52a02..8eb088af5 100644
--- a/players.c
+++ b/players.c
@@ -775,7 +775,7 @@ int8 SaveHighScoreValue(const Player *p)
for (i = 0; i < lengthof(_highscore_table[0]); i++) {
/* You are in the TOP5. Move all values one down and save us there */
if (hs[i].score <= score) {
- byte buf[sizeof(hs[i].company)];
+ char buf[sizeof(hs[i].company)];
// move all elements one down starting from the replaced one
memmove(&hs[i + 1], &hs[i], sizeof(HighScore) * (lengthof(_highscore_table[0]) - i - 1));
@@ -820,7 +820,6 @@ int8 SaveHighScoreValueNetwork(void)
{
HighScore *hs;
- byte buf[sizeof(_highscore_table[0]->company)];
Player* const *p_cur = &player_sort[0];
uint8 i;
@@ -828,6 +827,8 @@ int8 SaveHighScoreValueNetwork(void)
/* Copy over Top5 companies */
for (i = 0; i < lengthof(_highscore_table[LAST_HS_ITEM]) && i < (uint8)count; i++) {
+ char buf[sizeof(_highscore_table[0]->company)];
+
hs = &_highscore_table[LAST_HS_ITEM][i];
SetDParam(0, (*p_cur)->president_name_1);
SetDParam(1, (*p_cur)->president_name_2);