Opened 8 years ago

Closed 7 years ago

#1655 closed bug (fixed (in master))

wiz_create_artifact() does not handle bad input correctly.

Reported by: myshkin Owned by:
Milestone: 3.4.0 Keywords: wizmode
Cc:

Description

Creating artifact 999 crashes the game, as i_ptr doesn't get initialized. Creating artifact " " generates the Phial in a standard artifacts game.

Change History (3)

comment:1 Changed 7 years ago by noz

The reason that " " generates the Phial is that a substring search is done if the name doesn't match exactly, and " " matches the space in the middle of "of Galadriel". Perhaps we should only search substrings of length 2?

I will put in the necessary numeric checks.

comment:2 Changed 7 years ago by fizzix

98385b7 fixes the crash but the error message looks a little wonky on windows. there's an extra "a-more" that appears after the "No artifact found."

comment:3 Changed 7 years ago by magnate

  • Resolution set to fixed (in master)
  • Status changed from new to closed

[98385b7]

Note: See TracTickets for help on using tickets.