Selaa lähdekoodia

deterministically handle error in incomplete regexp escape sequence

zeromus 9 vuotta sitten
vanhempi
commit
b589ea521d
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      sqstdlib/sqstdrex.cpp

+ 3 - 0
sqstdlib/sqstdrex.cpp

@@ -153,6 +153,9 @@ static SQInteger sqstd_rex_charnode(SQRex *exp,SQBool isclass)
                      exp->_nodes[node].right = ce;
                      return node;
                 }
+            case 0:
+                sqstd_rex_error(exp,_SC("letter expected for argument of escape sequence"));
+                break;                
             case 'b':
             case 'B':
                 if(!isclass) {