Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 96adbe9

Browse filesBrowse files
committed
src,tools: drop nul byte from built-in source code
PR-URL: #5418 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
1 parent cdc7e02 commit 96adbe9
Copy full SHA for 96adbe9

File tree

Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎src/node_javascript.cc‎

Copy file name to clipboardExpand all lines: src/node_javascript.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ using v8::String;
2020
Local<String> MainSource(Environment* env) {
2121
return String::NewFromUtf8(
2222
env->isolate(), reinterpret_cast<const char*>(node_native),
23-
NewStringType::kNormal, sizeof(node_native) - 1).ToLocalChecked();
23+
NewStringType::kNormal, sizeof(node_native)).ToLocalChecked();
2424
}
2525

2626
void DefineJavaScript(Environment* env, Local<Object> target) {
Collapse file

‎tools/js2c.py‎

Copy file name to clipboardExpand all lines: tools/js2c.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343

4444
def ToCArray(filename, lines):
45-
return ','.join(str(ord(c)) for c in lines + '\0')
45+
return ','.join(str(ord(c)) for c in lines)
4646

4747

4848
def CompressScript(lines, do_jsmin):
@@ -221,7 +221,7 @@ def ReadMacros(lines):
221221

222222

223223
NATIVE_DECLARATION = """\
224-
{ "%(id)s", %(escaped_id)s_native, sizeof(%(escaped_id)s_native)-1 },
224+
{ "%(id)s", %(escaped_id)s_native, sizeof(%(escaped_id)s_native) },
225225
"""
226226

227227
SOURCE_DECLARATION = """\

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.