From 22656abc9ca598136f574afccffa1c68a6ee77a7 Mon Sep 17 00:00:00 2001 From: wangrx Date: Fri, 8 Mar 2024 16:41:13 +0800 Subject: [PATCH] Fix mjsunit/regexp-standalones.js --- ecmascript/regexp/regexp_executor.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ecmascript/regexp/regexp_executor.h b/ecmascript/regexp/regexp_executor.h index 91adc2f10a..a42ccdcbae 100644 --- a/ecmascript/regexp/regexp_executor.h +++ b/ecmascript/regexp/regexp_executor.h @@ -149,7 +149,8 @@ public: { if (IsEOF() || // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic) - ((flags_ & RegExpParser::FLAG_MULTILINE) != 0 && PeekChar(currentPtr_, inputEnd_) == '\n')) { + ((flags_ & RegExpParser::FLAG_MULTILINE) != 0 + && (PeekChar(currentPtr_, inputEnd_) == '\n' || PeekChar(currentPtr_, inputEnd_) == '\r'))) { Advance(opCode); } else { if (MatchFailed()) { -- Gitee