diff --git a/src/string_bytes.cc b/src/string_bytes.cc index 90050dfcb5..5bf0a30e27 100644 --- a/src/string_bytes.cc +++ b/src/string_bytes.cc @@ -556,8 +556,7 @@ Local StringBytes::Encode(const char* buf, Local val; switch (encoding) { case BUFFER: - return scope.Close( - Buffer::New(static_cast(buf), buflen)->handle_); + return scope.Close(Buffer::New(buf, buflen)->handle_); case ASCII: if (contains_non_ascii(buf, buflen)) {