https://gitlab.synchro.net/main/sbbs/-/commit/09211da1cfbfd5c3e5c135d3
Modified Files:
src/doors/clans-src/src/defines.h makenpc.c myopen.h
Log Message:
Fix topic overflow in makenpc; expand MAX_TOPICS to 128
makenpc wrote past the end of Topics[MAX_TOPICS] without bounds
checking, corrupting IntroTopic, OddsOfSeeing, and other fields
when an NPC had more than 10 topics. Add a bounds check that
exits with an error when TopicsKnown >= MAX_TOPICS.
Raise MAX_TOPICS from 10 to 128 and update BUF_SIZE_NPCInfo
accordingly (1266 -> 12830). Replace the single Language static
assert in myopen.h with per-type checks for all BUF_SIZE constants
that pass through the shared serBuf (NPCInfo excluded — it uses
local buffers).
Co-Authored-By: Claude Opus 4.6 <
noreply@anthropic.com>
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net