aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'engines/xeen/dialogs')
-rw-r--r--engines/xeen/dialogs/dialogs_spells.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/xeen/dialogs/dialogs_spells.cpp b/engines/xeen/dialogs/dialogs_spells.cpp
index 3645b2e9b1..e1a0c22e3e 100644
--- a/engines/xeen/dialogs/dialogs_spells.cpp
+++ b/engines/xeen/dialogs/dialogs_spells.cpp
@@ -412,7 +412,8 @@ int CastSpell::show(XeenEngine *vm) {
spellId = dlg->execute(c);
if (g_vm->shouldExit() || spellId == -1) {
- result = 0;
+ result = -1;
+ break;
} else {
result = spells.castSpell(c, (MagicSpell)spellId);
}