]> git.sesse.net Git - movit/commit
Fix an off-by-one in shader bundle generation.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 22 Jul 2023 16:45:44 +0000 (18:45 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 22 Jul 2023 16:45:44 +0000 (18:45 +0200)
commit61799c1d01e79b7d203cf2c89798aa567a341aba
tree6867867fdc59b637f274493750f183c132aa4235
parentdbe9f61e611fafb918328b6f99e4533d2401e775
Fix an off-by-one in shader bundle generation.

Non-ASCII characters would inadvertently become two bytes instead of one,
which would (for shaders after that in the bundle) give the wrong offsets
and thus potentially corrupted shaders.

Normally, this wouldn't really be noticed since the first things are
comments and the lasts are #undef, but in some cases, the shader
compilers would complain on suspicious things.

Reported by Stefano Rivera, who also provided a test system for debugging.
make_bundled_shaders.cpp