https://gitlab.synchro.net/main/sbbs/-/commit/c852b6165d64efa558900b1a
Modified Files:
src/sbbs3/chat.cpp exec.cpp mailsrvr.cpp useredit.cpp
Log Message:
Don't depend on plain char being signed in tests for -1/non-ASCII
Where plain char is unsigned (e.g. Linux on ARM), these comparisons were
never true (or always true):
- mime_encode_word() tested "*p >= 0" for a US-ASCII char, so non-ASCII
bytes were copied unencoded into a "=?utf-8?q?" header word. From
5564eb67e84 (2024-09-28).
- useredit()'s flag, exemption and restriction prompts tested "c < 0" for
the -1 that getkeys() returns. When that -1 was caused by a disconnect
rather than an abort, FLAG(-1) was toggled in the user's record. From
62f78148860 (2023-11-22).
- Baja's GETCMD tested "(char)csi->cmd == -1", so an aborted GETCMD left
0xFF as the command key rather than Ctrl-C. From 7e3e47141a5
(2000-10-10).
- The guru's word scan tested "line[i] < 0"; harmless only because
isalnum() rejects such bytes in the C locale. From ec20d959736
(2020-11-05).
Same class of bug as 9f058a3352 (2026-11-19). Only compile-checked, with
GCC, using both -fsigned-char and -funsigned-char.
Co-Authored-By: Claude Fable 5.2 <
noreply@anthropic.com>