From 1affbf8193d6b78ad2f621537400c726a5d478dc Mon Sep 17 00:00:00 2001 From: hecunmao Date: Fri, 8 Aug 2025 16:47:34 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E6=AD=A3=E5=88=99=E5=AF=B9=E4=BA=8E(?= =?UTF-8?q?=3F:|)=20=E5=8C=B9=E9=85=8D=E5=A4=B1=E6=95=88"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/ICS3DH Signed-off-by: hecunmao Change-Id: I8af629f045d8d53891d456b2de17f358a5160813 --- ecmascript/mem/dyn_chunk.cpp | 2 +- test/moduletest/regexp/regexp.js | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/ecmascript/mem/dyn_chunk.cpp b/ecmascript/mem/dyn_chunk.cpp index 3d414af3d9..09f82390c3 100644 --- a/ecmascript/mem/dyn_chunk.cpp +++ b/ecmascript/mem/dyn_chunk.cpp @@ -61,7 +61,7 @@ int DynChunk::Insert(uint32_t position, size_t len) } size_t moveSize = size_ - position; // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic) - if (LIKELY(moveSize > 0) && memmove_s(buf_ + position + len, moveSize, buf_ + position, moveSize) != EOK) { + if (memmove_s(buf_ + position + len, moveSize, buf_ + position, moveSize) != EOK) { return FAILURE; } size_ += len; diff --git a/test/moduletest/regexp/regexp.js b/test/moduletest/regexp/regexp.js index c17dbd1f36..279b7e0778 100644 --- a/test/moduletest/regexp/regexp.js +++ b/test/moduletest/regexp/regexp.js @@ -944,10 +944,6 @@ assert_equal(res8.flags,'g'); assert_equal(e instanceof SyntaxError, true); } } -{ - let reg = /a(?:|x)$/ - assert_equal(JSON.stringify(reg.exec("ax")), '["ax"]') -} try { class C12 { } -- Gitee