|Anonymous | Login | Signup for a new account||2019-04-25 22:34 CEST|
|Main | My View | View Issues | Change Log | Wiki | Tavern | News|
|Viewing Issue Simple Details|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0008417||[DCSS] Patches||minor||have not tried||2014-04-23 04:40||2014-06-18 17:03|
|Status||resolved||Product Branch||0.15 ancient branch|
|Summary||0008417: godprayer.cc: Kiku/Necronomicon fixes, check result of move_item_to_grid and fix return value|
godprayer.cc function _altar_prayer, in the context of wishing for a Necronomicon from Kiku, reported a warning where did_something was being assigned and then ignored.
This led to two discoveries.
First, the result of move_item_to_grid (when a Necronomicon is granted) is not checked, so if it fails for some reason the user might still be informed that they received a Necro, incrorectly.
Second, while this function used to require a 'return true' to prevent sacrificing a Necro to Kiku, that code was removed in 0.7.0 and it is now safe (and probably desirable) to return the value of did_something instead. This decays a failed request into a typical prayer, to the best of my understanding anyways.
Patch attached to implement both the move_item_to_grid result check and repair the Necro-Kiku return values, per IRC discussion.
I'm not entirely sure how to test this patch beyond compiling it.
|Tags||No tags attached.|
|Attached Files||kiku_necro.patch [^] (1,239 bytes) 2014-04-23 04:40 [Show Content]|
|The code in question has since been refactored to make the return value not an issue, but the case of movement failure still was one; fixed in 26e17d37.|
|2014-04-23 04:40||floatingatoll||New Issue|
|2014-04-23 04:40||floatingatoll||File Added: kiku_necro.patch|
|2014-06-18 17:03||wheals||Note Added: 0026549|
|2014-06-18 17:03||wheals||Status||new => resolved|
|2014-06-18 17:03||wheals||Fixed in Branch||=> 0.15 development branch|
|2014-06-18 17:03||wheals||Resolution||open => done|
|2014-06-18 17:03||wheals||Assigned To||=> wheals|
|Mantis 1.1.8[^] Copyright © 2000 - 2009 Mantis Group|