]> granicus.if.org Git - re2c/commit
Explicit cast of 'char' to 'unsigned char' in cmd options lexer.
authorUlya Trofimovich <skvadrik@gmail.com>
Tue, 11 Aug 2015 14:18:04 +0000 (15:18 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Tue, 11 Aug 2015 14:18:04 +0000 (15:18 +0100)
commit1ba85989cf9718425ead1489d0d4574ec4cbf57e
treecaa0c89c108881b66256f2c1df6132ee33824c72
parentb5b2562ebe64e62676d276955d9067948a2b613e
Explicit cast of 'char' to 'unsigned char' in cmd options lexer.

Much the same as previous commit, only this time YYCTYPE has been
erroneously set to 'char' instead of 'unsigned char. It didn't
cause any warnings or errors becase regular expressions contain
only ASCII range characters. However, relying on this is unsafe:
hypotheticlly re2c can generate some strange comparisons that compile
but fail in runtime.

Explicit cast makes sure thet all comparisons are between unsigned
values.
re2c/bootstrap/src/conf/parse_opts.cc
re2c/src/conf/parse_opts.re