From b589ea521d61761e56c3e968c75d8ac0fc3bcbf5 Mon Sep 17 00:00:00 2001 From: zeromus Date: Thu, 21 Apr 2016 23:09:36 -0500 Subject: [PATCH] deterministically handle error in incomplete regexp escape sequence --- sqstdlib/sqstdrex.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sqstdlib/sqstdrex.cpp b/sqstdlib/sqstdrex.cpp index 9390c2d..38a8508 100644 --- a/sqstdlib/sqstdrex.cpp +++ b/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) {