Replace non-ASCII characters in text input with '?'

This matches `SimpleGraphics` behavior and prevents a crash that can
happen if PoB tries to delete a non-ASCII character.

Fixes #9.
This commit is contained in:
meehl committed 2025-11-06 16:55:31 +01:00
1 parent 51e6881cb0
commit 50d4b4b09c
2 files changed
+6 -1

No files matched your search

+1
View File
@@ -133,6 +133,7 @@ impl PoBMode {
}
}
AppEvent::CharacterInput { ch } => {
let ch = if ch.is_ascii() { ch } else { '?' };
self.lua_instance
.handle_event(PoBEvent::Char(ch), &mut ctx)?;
}