From 62d1dbac659213b17d16764f31bf3a1124027284 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 17 Aug 2019 21:53:09 +0300 Subject: STARTREK: More explicit definition of text types --- engines/startrek/room.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/startrek/room.cpp b/engines/startrek/room.cpp index 08609c52dc..5cc913a6b3 100644 --- a/engines/startrek/room.cpp +++ b/engines/startrek/room.cpp @@ -151,12 +151,13 @@ void Room::loadRoomMessage(const char *text) { int messageNum; bool isTalkMessage; bool isLookWithTalkerMessage; + char textType = text[10]; // _ and U: talk message, N: look message, L: look with talker message if (text[5] != '\\') error("loadRoomMessage: Invalid message"); - isTalkMessage = (text[10] == '_' || text[10] == 'U'); // U = Uhura - isLookWithTalkerMessage = (text[10] == 'L'); + isTalkMessage = (textType == '_' || textType == 'U'); // U = Uhura + isLookWithTalkerMessage = (textType == 'L'); sscanf((const char *)(text + 11), "%3d", &messageNum); if (text[14] != '#') -- cgit v1.2.3