BBS:      TELESC.NET.BR
Assunto:  src/doors/clans-src/src/defines.h makenpc.c myopen.h
De:       Deuc¨
Data:     Mon, 9 Mar 2026 00:11:11 -0700
-----------------------------------------------------------
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 
n
---
  mSynchronetn  hgVertrauen n hHome of Synchronet n gh[vert/cvs/bbs].synchro.net

-----------------------------------------------------------
[Voltar]