From b23291b9777311d73363bd97f2392402d2b2eb6c Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 27 Oct 2018 22:09:01 -0700 Subject: GLK: SCOTT: Fix loading game data --- engines/gargoyle/scott/scott.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'engines/gargoyle') diff --git a/engines/gargoyle/scott/scott.cpp b/engines/gargoyle/scott/scott.cpp index 9632408d46..d533a7ea44 100644 --- a/engines/gargoyle/scott/scott.cpp +++ b/engines/gargoyle/scott/scott.cpp @@ -325,7 +325,7 @@ char *Scott::ReadString(Common::SeekableReadStream *f) { tmp[ct++] = c; else tmp[ct++] = '?'; - } while (1); + } tmp[ct] = 0; t = (char *)MemAlloc(ct + 1); @@ -1263,15 +1263,11 @@ int Scott::xstrncasecmp(const char *s1, const char *s2, size_t n) { void Scott::readInts(Common::SeekableReadStream *f, size_t count, ...) { va_list va; va_start(va, count); - unsigned char c = '\0'; + unsigned char c = f->readByte(); for (size_t idx = 0; idx < count; ++idx) { - if (idx > 0) { - while (f->pos() < f->size() && Common::isSpace(c)) - c = f->readByte(); - } else { + while (f->pos() < f->size() && Common::isSpace(c)) c = f->readByte(); - } // Get the next value int *val = (int *)va_arg(va, int); -- cgit v1.2.3