diff options
-rw-r--r-- | engines/lure/strings.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/lure/strings.cpp b/engines/lure/strings.cpp index c05f01a511..1436b92fb8 100644 --- a/engines/lure/strings.cpp +++ b/engines/lure/strings.cpp @@ -228,11 +228,11 @@ void StringData::getString(uint16 stringId, char *dest, const char *hotspotName, // Returns the name or fragment of word at the specified index in the names resource char *StringData::getName(uint8 nameIndex) { - uint16 numNames = *((uint16 *) _names->data()) / 2; + uint16 numNames = READ_LE_UINT16(_names->data()) / 2; if (nameIndex >= numNames) error("Invalid name index was passed to getCharacterName"); - uint16 nameStart = *((uint16 *) (_names->data() + (nameIndex * 2))); + uint16 nameStart = READ_LE_UINT16(_names->data() + (nameIndex * 2)); return (char *) (_names->data() + nameStart); } |