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.
} else if (ch == '\\') {
printf("\\\\");
} else if (!isprint(ch)) {
- printf("\\0%o", ch);
+ printf("\\%o", ch);
} else {
printf("%c", ch);
}