https://gitlab.synchro.net/main/sbbs/-/commit/21ca1caac2cca95180055e92
Modified Files:
docs/v322_new.md exec/webfileindex.ssjs src/sbbs3/js_conio.cpp
Log Message:
conio.init(): accept mode names longer than six characters
The mode argument was read into a 7-byte buffer, so
JSSTRING_TO_STRBUF() truncated every name to six characters before
the first comparison. Four of the eleven accepted names are longer
than that, and none of them could ever match:
conio.init("CURSES_IBM") -> "CURSES", starts plain curses
conio.init("CURSES_ASCII") -> "CURSES", starts plain curses
conio.init("CONIO_FULLSCREEN") -> "CONIO_", Unhandled ciolib mode
conio.init("SDL_FULLSCREEN") -> "SDL_FU", Unhandled ciolib mode
The first two are the worse half: the call succeeds and the caller
gets a different video mode than it asked for, with no diagnostic.
The truncation is visible in the error text of the other two, which
quotes the buffer rather than the argument.
Widen the buffer to 32, and fix the "CURSES_ACSCII" spelling in the
same chain - correct in the enum (CIOLIB_MODE_CURSES_ASCII), in this
function's own jsdocs, and in the equivalent chain in js_uifc.cpp,
misspelled only here. No script can depend on the misspelling: the
truncation made both spellings behave identically.
Also in webfileindex.ssjs, "overlow: auto" is not a CSS property, so
the file table never got its own scrollbar.
Co-Authored-By: Claude Opus 5 (1M context) <
noreply@anthropic.com>
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net