Opened 8 years ago

Closed 8 years ago

#1652 closed bug (fixed (in master))

Cocoa port crashes on trying to identify some non-alphanumeric keys

Reported by: myshkin Owned by: myshkin
Milestone: 3.4.0 Keywords: mac commands
Cc:

Description

As reported by jujuben on oook, pressing / for identify and then certain keys such as arrows, tab, enter, or delete will crash the game. The crash occurs because Term_mbcs_cocoa() is not expecting the input it's getting from char_matches_key().

Change History (2)

comment:1 Changed 8 years ago by myshkin

This turns out to have two issues. The mbcs hook I wrote for the Carbon and Cocoa ports was asserting when it encountered an invalid multibyte sequence, instead of returning (size_t)-1 as per spec. Also, lookup_symbol() was blithely passing on (char)sym.code to a %c format; when the keypress code was not a valid wchar_t, do_cmd_query_symbol() would eventually print garbage to the screen.

I've fixed both of these issues in commit 03015901 of master.

comment:2 Changed 8 years ago by myshkin

  • Resolution set to fixed (in master)
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.