When invoking windres with a preprocessor parameter that contains angled
brackets, the shell will try to interpret them, leading to an error.
For example with an empty test.rc file:
$ i686-w64-mingw32-windres '-DTEST=<foo>' -o test.o -i test.rc
sh: 1: cannot open foo: No such file
i686-w64-mingw32-windres: preprocessing failed.
After patch it correctly complains about no resources baked in:
$ ./i686-w64-mingw32-windres '-DTEST=<foo>' -o test.o -i test.rc
./i686-w64-mingw32-windres: no resources
Signed-off-by: Alibek Omarov <a1ba.omarov@gmail.com>
for (src = string, dest = buf; *src; src++, dest++)
{
- if (*src == '(' || *src == ')' || *src == ' ')
+ if (*src == '(' || *src == ')' || *src == ' ' || *src == '<' || *src == '>')
*dest++ = '\\';
*dest = *src;
}