From 835671d10aee86e2484a341a1330a4adf5473479 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Mon, 3 Jun 2019 21:13:00 +0100 Subject: STARTREK: Fix use of uninitialized variable --- engines/startrek/rooms/demon6.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'engines/startrek') 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++; } -- cgit v1.2.3