diff options
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r-- | crawl-ref/source/item_use.cc | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 80cd805a18..278be8f1b2 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -3173,33 +3173,30 @@ static void handle_read_book( int item_slot ) skill_manual(item_slot); return; } - else + + while (true) { // Spellbook spell = read_book( you.inv[item_slot], RBOOK_READ_SPELL ); - } - if (spell < 'a' || spell > 'h') //jmf: was 'g', but 8=h - { - mesclr( true ); - return; - } - - spell_index = letter_to_index( spell ); + if (spell < 'a' || spell > 'h') //jmf: was 'g', but 8=h + { + mesclr( true ); + return; + } - spell_type nthing = - which_spell_in_book(you.inv[item_slot].sub_type, spell_index); - if (nthing == SPELL_NO_SPELL) - { - mesclr( true ); - return; - } + spell_index = letter_to_index( spell ); - describe_spell( nthing ); - redraw_screen(); + const spell_type nthing = + which_spell_in_book(you.inv[item_slot].sub_type, spell_index); + if (nthing == SPELL_NO_SPELL) + { + mesclr( true ); + return; + } - mesclr( true ); - return; + describe_spell( nthing ); + } } void read_scroll(void) |