mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Fix unicode RegExp processing bug
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
72205bb381
commit
ccf80322c8
1 changed files with 1 additions and 3 deletions
|
|
@ -110,9 +110,7 @@ static Value builtinRegExpExec(ExecutionState& state, Value thisValue, size_t ar
|
|||
const char* buf = reinterpret_cast<const char*>(&utfRes);
|
||||
size_t len = strnlen(buf, 2);
|
||||
size_t eUTF = len == 0 ? str->length() : (str->find(buf, len, 0));
|
||||
if (eUTF >= str->length()) {
|
||||
e = str->length();
|
||||
} else if ((int)eUTF > e || e == (int)str->length()) {
|
||||
if ((int)eUTF > e || e == (int)str->length()) {
|
||||
e = eUTF;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue