From b2e58e0d03ae73e544f648be5330d1961f80d655 Mon Sep 17 00:00:00 2001 From: cy384 Date: Tue, 10 Nov 2020 17:42:14 -0500 Subject: [PATCH] quick fix for period password input bug (github issue #2) --- ssheven.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ssheven.c b/ssheven.c index 32b257b..abfe52f 100644 --- a/ssheven.c +++ b/ssheven.c @@ -827,15 +827,7 @@ pascal Boolean TwoItemFilter(DialogPtr dlog, EventRecord *event, short *itemHit) *itemHit = 6; return true; } - break; - - case kLeftArrowCharCode: - case kRightArrowCharCode: - case kUpArrowCharCode: - case kDownArrowCharCode: - case kHomeCharCode: - case kEndCharCode: - return false; // don't handle them + // fall through in case of a plain '.' !!!! default: // TODO: this is dumb and assumes everything else is a valid text character selStart = (**((DialogPeek)dlog)->textH).selStart; // Get the selection in the visible item @@ -847,6 +839,14 @@ pascal Boolean TwoItemFilter(DialogPtr dlog, EventRecord *event, short *itemHit) event->message = 0xa5; // Replace with character to use (the bullet) DialogSelect(event, &evtDlog, itemHit); // Put in fake character return true; + + case kLeftArrowCharCode: + case kRightArrowCharCode: + case kUpArrowCharCode: + case kDownArrowCharCode: + case kHomeCharCode: + case kEndCharCode: + return false; // don't handle them } }