aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/avalanche/acci2.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/avalanche/acci2.cpp b/engines/avalanche/acci2.cpp
index 86600d62dc..45518fb485 100644
--- a/engines/avalanche/acci2.cpp
+++ b/engines/avalanche/acci2.cpp
@@ -454,10 +454,12 @@ void Acci::parse() {
cc = c;
c.toUppercase();
while (!c.empty()) {
- while ((c[0] == ' ') && (!c.empty())) {
+ while ((!c.empty()) && (c[0] == ' ')) {
c.deleteChar(0);
cc.deleteChar(0);
}
+ if (c.empty())
+ break;
// Get the following word of the strings.
byte size = pos(Common::String(' '), c) + 1;