Opened 6 years ago

Closed 5 years ago

#1811 closed bug (fixed (in master))

Dropping artifacts causes crashes.

Reported by: molybdenum Owned by: takkaria
Milestone: 3.5.1 Keywords:
Cc:

Description

Dropping or throwing Eonwe and Orome seems to cause some kind of crash. See http://angband.oook.cz/forum/showpost.php?p=88348&postcount=35.

Change History (5)

comment:1 Changed 6 years ago by takkaria

  • Milestone changed from Triage to 3.5.1

comment:2 Changed 5 years ago by PowerWyrm

See http://angband.oook.cz/forum/showthread.php?t=6675: get_mon_name() takes a max_width parameter which can lead to unicode characters being truncated (the first char of the two-byte unicode char is added to the returned string, the second char is discarded). If the last character of the returned string is unicode, then max_width + 1 should be used to return the string.

comment:3 Changed 5 years ago by noz

The analysis of the fault in the above forum thread is great - many thanks. However, I think the fix is wrong - the calculation of lengths when truncating strings should be using the display lengths. Far too many assumptions are made throughout the code that one display space = 1 character = 1 byte.

comment:4 Changed 5 years ago by takkaria

  • Owner set to takkaria
  • Status changed from new to assigned

Working on this, about halfway to a fix.

comment:5 Changed 5 years ago by takkaria

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

Fixed in 945ac0e

Note: See TracTickets for help on using tickets.