Browse Source

[5036] Fixed control char test for signed chars

Francis Dupont 8 years ago
parent
commit
af79ebabdc
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/bin/dhcp6/dhcp6_lexer.cc
  2. 1 1
      src/bin/dhcp6/dhcp6_lexer.ll

+ 1 - 1
src/bin/dhcp6/dhcp6_lexer.cc

@@ -2641,7 +2641,7 @@ YY_RULE_SETUP
             }
             break;
         default:
-            if (c < 0x20) {
+            if ((c > 0) && (c < 0x20)) {
                 // impossible condition
                 driver.error(driver.loc_, "Invalid control in \"" + raw + "\"");
             }

+ 1 - 1
src/bin/dhcp6/dhcp6_lexer.ll

@@ -968,7 +968,7 @@ ControlCharacterFill            [^"\\]|\\{JSONEscapeSequence}
             }
             break;
         default:
-            if (c < 0x20) {
+            if ((c >= 0) && (c < 0x20)) {
                 // impossible condition
                 driver.error(driver.loc_, "Invalid control in \"" + raw + "\"");
             }