diff --git a/AGENTS.md b/AGENTS.md index efb1fffe..f8e8b6a4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -80,7 +80,10 @@ narratives and test notes, is `docs/reference/mcde-agents-history-2026-11-13.txt and refreshed after a load, and Open/Save/Invert convert colours through the visual's masks on TrueColor (or in batches otherwise), never one X round trip per pixel (measured 2026-11-21: open 18.3 s -> 0.02 s, invert - 14.9 s -> 0.05 s, save 6.3 s -> 0.23 s on a 1024x768 BMP). + 14.9 s -> 0.05 s, save 6.3 s -> 0.23 s on a 1024x768 BMP; PseudoColor + measured 2026-11-22 on Xvfb depth 8: 4-colour BMP round trip exact, + selftest PASS -- a picture with more colours than the 256-cell colormap + holds loses the excess, as any 8-bit paint must). McdeSys has a catalog too (`lib/McdeSys/mcdesys.msg`, `lib/McdeSys/ text.c`, `mcde_sys_msg`): common.c's tool errors ask it for their sentence (messages 1-9: not there, cannot start, failed with status, no pipe, no diff --git a/programs/dtpaint/dtpaint.c b/programs/dtpaint/dtpaint.c index ec319d18..9c0d819b 100644 --- a/programs/dtpaint/dtpaint.c +++ b/programs/dtpaint/dtpaint.c @@ -1109,7 +1109,10 @@ static void DoSave(const char *path) { if (SaveBMP(path) == 0) { - snprintf(curPath, sizeof curPath, "%s", path); + /* C_SAVE passes curPath itself; snprintf onto the same buffer + * is undefined and emptied it (the title fell back to untitled) */ + if (path != curPath) + snprintf(curPath, sizeof curPath, "%s", path); dirty = 0; SetTitle(); } else {