diff options
| author | 2026-11-14 00:35:48 +0000 | |
|---|---|---|
| committer | 2026-11-14 00:35:48 +0000 | |
| commit | 933bfbe269581c2dc42227eaaecb9e56d206a74a (patch) | |
| tree | 87353973fcad380874fd4a5eca3281e8690225cd /src | |
| parent | 0551566cde7743705ff6993fd6a465cc9e4ee110 (diff) | |
| download | sst-1ea66875f2fc4af0f62ee94a1eb85c26ec9ec22b.tar.gz sst-1ea66875f2fc4af0f62ee94a1eb85c26ec9ec22b.zip | |
Fix a last-minute off-by-what-was-I-thinking errorHEADv0.19-BETAmaster
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?
Diffstat (limited to 'src')
| -rw-r--r-- | src/speedrun.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |
