summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changes.txt1
-rw-r--r--src/cmd5.c4
-rw-r--r--src/externs.h2
-rw-r--r--src/spells.pkg2
4 files changed, 5 insertions, 4 deletions
diff --git a/changes.txt b/changes.txt
index e298b98a..071511e3 100644
--- a/changes.txt
+++ b/changes.txt
@@ -3,6 +3,7 @@ T.o.M.E 2.3.7 (ah)
- Remove item pval from antimagic field strength calculation since it
may be both non-zero and invisible (to the player).
- Miscellaneous 64 bit fixes.
+- Fix Lua errors when hitting <ESC> while choosing spell.
T.o.M.E 2.3.6 (ah)
diff --git a/src/cmd5.c b/src/cmd5.c
index 0e683486..eef65a68 100644
--- a/src/cmd5.c
+++ b/src/cmd5.c
@@ -2172,10 +2172,10 @@ bool get_item_hook_find_spell(int *item)
/*
* Get a spell from a book
*/
-u32b get_school_spell(cptr do_what, cptr check_fct, s16b force_book)
+s32b get_school_spell(cptr do_what, cptr check_fct, s16b force_book)
{
int i, item;
- u32b spell = -1;
+ s32b spell = -1;
int num = 0;
s32b where = 1;
int ask;
diff --git a/src/externs.h b/src/externs.h
index 68e44bbe..1777cf34 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -822,7 +822,7 @@ extern void do_poly_self(void);
extern void brand_weapon(int brand_type);
extern cptr symbiote_name(bool capitalize);
extern int use_symbiotic_power(int r_idx, bool great, bool only_number, bool no_cost);
-extern u32b get_school_spell(cptr do_what, cptr check_fct, s16b force_book);
+extern s32b get_school_spell(cptr do_what, cptr check_fct, s16b force_book);
extern void do_cmd_copy_spell(void);
extern void cast_school_spell(void);
extern void browse_school_spell(int book, int pval, object_type *o_ptr);
diff --git a/src/spells.pkg b/src/spells.pkg
index 65081aff..d1f50566 100644
--- a/src/spells.pkg
+++ b/src/spells.pkg
@@ -2462,7 +2462,7 @@ extern s32b lua_spell_device_chance(s32b chance, int level, int base_level);
* If no spell is chosen, -1 is returned.
* @note (see file cmd5.c)
*/
-extern u32b get_school_spell(cptr do_what, cptr check_fct, s16b force_book);
+extern s32b get_school_spell(cptr do_what, cptr check_fct, s16b force_book);
/** @name Last Teleportation
* @brief Coordinates of last successful teleportation