https://gitlab.synchro.net/main/sbbs/-/commit/fbfdfc8140cdcb50c11933f4
Modified Files:
src/sbbs3/js_socket.cpp
Log Message:
js_socket: fix js_sendto getaddrinfo error-capture parens (CID 639937)
The expression was
if ((result = getaddrinfo(...) != 0))
which parses as result = (getaddrinfo(...) != 0), so result becomes 0
or 1 instead of the actual EAI_* error code. The subsequent gai_strerror(result) and "%d" format then report the wrong error.
Move the closing paren so the assignment captures the real return:
if ((result = getaddrinfo(...)) != 0)
Co-Authored-By: Claude Opus 4.7 <
noreply@anthropic.com>
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net