1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-29 17:39:09 +00:00

(svn r3529) - Fix: [ 1415782 ] crash in string code with openbsd/zaurus; alignment issues (thanks Tron for the help)

This commit is contained in:
Darkvater
2006-02-03 21:51:42 +00:00
parent 6dd2affaad
commit c5a669b39f
5 changed files with 29 additions and 24 deletions

View File

@@ -500,7 +500,7 @@ static char *FormatString(char *buff, const char *str, const int32 *argv, uint c
break;
case 0x81: // {STRINL}
buff = GetStringWithArgs(buff, READ_LE_UINT16(str), argv);
buff = GetStringWithArgs(buff, ReadLE16Unaligned(str), argv);
str += 2;
break;
case 0x82: // {DATE_LONG}
@@ -1015,7 +1015,7 @@ bool ReadLanguagePack(int lang_index)
#if defined(TTD_BIG_ENDIAN)
for (i = 0; i != 32; i++) {
lang_pack->offsets[i] = READ_LE_UINT16(&lang_pack->offsets[i]);
lang_pack->offsets[i] = ReadLE16Aligned(&lang_pack->offsets[i]);
}
#endif