diff options
-rw-r--r-- | engines/hopkins/anim.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp index 3971300ff4..4b16811d65 100644 --- a/engines/hopkins/anim.cpp +++ b/engines/hopkins/anim.cpp @@ -844,8 +844,11 @@ int AnimationManager::CHARGE_BANK_SPRITE1(int idx, const Common::String &filenam _vm->_globals.Bank[idx].field1A = v8; Common::String ofsFilename = _vm->_globals.Bank[idx].filename1; - while (ofsFilename.lastChar() != '.') + char ch; + do { + ch = ofsFilename.lastChar(); ofsFilename.deleteLastChar(); + } while (ch != '.'); ofsFilename += ".OFS"; _vm->_fileManager.CONSTRUIT_FICHIER(_vm->_globals.HOPANIM, ofsFilename); |