返して使用しようとするとrepeat_pull()でのスタックの読み出し順序が狂
い, get_mind_power()が呪文番号INVEN_FORCEを返し, その結果配列外アクセ
スを起こしたりMPが異常な値になったりしていたので, get_mind_power()で
repeat_pull()された呪文番号がINVEN_FORCEだった場合はもう1度だけ
repeat_pull()して正しい呪文番号を取得するように仮修正. その場しのぎに
過ぎないので, 後で別の方法を考える必要はある.
#ifdef ALLOW_REPEAT /* TNB */
- /* Get the spell, if available */
- if (repeat_pull(sn))
+ /* Get the spell, if available */
+ if (repeat_pull(sn))
{
- /* Verify the spell */
- if (mind_ptr->info[*sn].min_lev <= plev)
- {
- /* Success */
- return (TRUE);
- }
+ /* Hack -- If requested INVEN_FORCE(1111), pull again */
+ if (*sn == INVEN_FORCE) repeat_pull(sn);
+
+ /* Verify the spell */
+ if (mind_ptr->info[*sn].min_lev <= plev)
+ {
+ /* Success */
+ return (TRUE);
+ }
}
#endif /* ALLOW_REPEAT -- TNB */