From b589ea521d61761e56c3e968c75d8ac0fc3bcbf5 Mon Sep 17 00:00:00 2001 From: zeromus Date: Thu, 21 Apr 2016 23:09:36 -0500 Subject: [PATCH 1/2] 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) { From 301db648daf4d39ee8375e75335a4539fb1baf48 Mon Sep 17 00:00:00 2001 From: zeromus Date: Thu, 21 Apr 2016 23:22:48 -0500 Subject: [PATCH 2/2] docs typo fixes --- doc/source/stdlib/stdstringlib.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/stdlib/stdstringlib.rst b/doc/source/stdlib/stdstringlib.rst index 9078d39..f1f7dfc 100644 --- a/doc/source/stdlib/stdstringlib.rst +++ b/doc/source/stdlib/stdstringlib.rst @@ -69,8 +69,8 @@ The regexp class .. js:class:: regexp(pattern) - The regexp object represent a precompiled regular expression pattern. The object is created - trough `regexp(patern)`. + The regexp object represents a precompiled regular expression pattern. The object is created + through `regexp(pattern)`. +---------------------+--------------------------------------+