diff options
Diffstat (limited to 'build2/test/script/regex.cxx')
-rw-r--r-- | build2/test/script/regex.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/build2/test/script/regex.cxx b/build2/test/script/regex.cxx index fe8bcb0..5e14e6e 100644 --- a/build2/test/script/regex.cxx +++ b/build2/test/script/regex.cxx @@ -341,7 +341,8 @@ namespace std { const char_type& c (*b++); - *m++ = c.type () == line_type::special && build2::digit (c.special ()) + *m++ = c.type () == line_type::special && c.special () >= 0 && + build2::digit (static_cast<char> (c.special ())) ? digit : 0; } |