xNetHack icon indicating copy to clipboard operation
xNetHack copied to clipboard

Fix some minor issues with searmsg

Open entrez opened this issue 3 years ago • 0 comments

searmsg used 'const' qualifier for the object parameter, but it could then be modified as long as obj != &cg.zeroobj (by cxname -> xname -> xname_flags changing dknown, bknown, etc). Eliminate the const qualifier from the parameter.

Another issue: magr was dereferenced before the guard against !magr, so move it down after the guard.

entrez avatar Oct 22 '22 22:10 entrez