diff options
Diffstat (limited to 'core/fxcrt/cfx_bytestring_unittest.cpp')
-rw-r--r-- | core/fxcrt/cfx_bytestring_unittest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fxcrt/cfx_bytestring_unittest.cpp b/core/fxcrt/cfx_bytestring_unittest.cpp index d7f265e32a..4379519046 100644 --- a/core/fxcrt/cfx_bytestring_unittest.cpp +++ b/core/fxcrt/cfx_bytestring_unittest.cpp @@ -653,7 +653,7 @@ TEST(fxcrt, ByteStringGetBuffer) { char* buffer = str.GetBuffer(12); // NOLINTNEXTLINE(runtime/printf) strcpy(buffer, "clams"); - str.ReleaseBuffer(); + str.ReleaseBuffer(str.GetStringLength()); EXPECT_EQ("clams", str); } { @@ -661,7 +661,7 @@ TEST(fxcrt, ByteStringGetBuffer) { char* buffer = str.GetBuffer(12); // NOLINTNEXTLINE(runtime/printf) strcpy(buffer + 2, "ams"); - str.ReleaseBuffer(); + str.ReleaseBuffer(str.GetStringLength()); EXPECT_EQ("clams", str); } } |