summaryrefslogtreecommitdiff
path: root/fxjs/fxjs_v8.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/fxjs_v8.cpp')
-rw-r--r--fxjs/fxjs_v8.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fxjs/fxjs_v8.cpp b/fxjs/fxjs_v8.cpp
index 970e4f144d..d3d2010b30 100644
--- a/fxjs/fxjs_v8.cpp
+++ b/fxjs/fxjs_v8.cpp
@@ -648,7 +648,7 @@ v8::Local<v8::Boolean> CFXJS_Engine::NewBoolean(bool b) {
v8::Local<v8::String> CFXJS_Engine::NewString(const CFX_ByteStringC& str) {
v8::Isolate* pIsolate = m_isolate ? m_isolate : v8::Isolate::GetCurrent();
- return v8::String::NewFromUtf8(pIsolate, str.c_str(),
+ return v8::String::NewFromUtf8(pIsolate, str.unterminated_c_str(),
v8::NewStringType::kNormal, str.GetLength())
.ToLocalChecked();
}