From 933bfbe269581c2dc42227eaaecb9e56d206a74a Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sat, 14 Nov 2026 00:35:48 +0000 Subject: Fix a last-minute off-by-what-was-I-thinking error Brought to my attention by Hayden just in time to avoid shipping something buggy. What I'd give to be able to run proper tests on all this code with UBSan or similar. I do too many stupid things like this all the time. More annoying than that is that is apparently this was spotted by one of them clankers. I've plenty of reasons to be unhappy about that, but then, what am I gonna do, refuse to fix the bug? --- src/speedrun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/speedrun.c') diff --git a/src/speedrun.c b/src/speedrun.c index 87942e2..9585604 100644 --- a/src/speedrun.c +++ b/src/speedrun.c @@ -235,7 +235,7 @@ DEF_CCMD_HERE(sst_speedrun_start, "Start recording demos for a speedrun", 0) { #else char *recordpath = path + prefixsz; #endif - recordpath[pathsz - nameend] = OS_LIT('\0'); + recordpath[nameend - prefixsz] = '\0'; con_msg("Speedrun recording started\n"); recording = true; demorec_forceauto = true; -- cgit v1.2.3-54-g00ecf