aboutsummaryrefslogtreecommitdiff
path: root/engines/startrek
diff options
context:
space:
mode:
authorThierry Crozat2019-06-03 21:13:00 +0100
committerThierry Crozat2019-06-03 21:13:00 +0100
commit835671d10aee86e2484a341a1330a4adf5473479 (patch)
treea648710b63614ce3ada601782ca9374b21b5b356 /engines/startrek
parent3a0ed17e66e01d8b5175904ed821244be8b278b8 (diff)
downloadscummvm-rg350-835671d10aee86e2484a341a1330a4adf5473479.tar.gz
scummvm-rg350-835671d10aee86e2484a341a1330a4adf5473479.tar.bz2
scummvm-rg350-835671d10aee86e2484a341a1330a4adf5473479.zip
STARTREK: Fix use of uninitialized variable
Diffstat (limited to 'engines/startrek')
-rw-r--r--engines/startrek/rooms/demon6.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/engines/startrek/rooms/demon6.cpp b/engines/startrek/rooms/demon6.cpp
index de3b4b41b0..c56ad6c5c4 100644
--- a/engines/startrek/rooms/demon6.cpp
+++ b/engines/startrek/rooms/demon6.cpp
@@ -568,11 +568,10 @@ int Room::demon6ShowCaseProcessSelection(Sprite *sprites, Sprite *clickedSprite,
// does check the clock cycle, but doesn't do a proper comparison with
// it.)
TrekEvent event;
-
- while (event.type != TREKEVENT_TICK) {
+ do {
if (!_vm->popNextEvent(&event))
continue;
- }
+ } while (event.type != TREKEVENT_TICK);
clickedSprite->pos.y++;
}