Skip to content

Fix MSVC Build Error #16

@fmsy

Description

@fmsy

The Error

..\src\Int64.cc(103): error C2466: Zuordnung eines Arrays der konstanten Größe 0 nicht möglich. [C:\Users\fsy\AppData\R
oaming\npm\node_modules\int64-native\build\Int64.vcxproj]

The Fix

diff --git a/src/Int64.cc b/src/Int64.cc
index 802ed2a..dfe79a9 100644
--- a/src/Int64.cc
+++ b/src/Int64.cc
@@ -100,7 +100,7 @@ NAN_METHOD(Int64::New) {
   } else {
     v8::Local<v8::Function> cons = Nan::New<v8::Function>(constructor);
     if (info.Length() == 0) {
-      v8::Local<v8::Value> argv[0] = {};
+      v8::Local<v8::Value>* argv = nullptr;
       info.GetReturnValue().Set(cons->NewInstance(0, argv));
     } else if (info.Length() == 1) {
       v8::Local<v8::Value> argv[1] = {info[0]};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions