Skip to content

Commit

Permalink
fixes S7Client.DBGet() arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiask88 committed Apr 15, 2017
1 parent b9ea936 commit 4bd69dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_snap7_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1831,11 +1831,11 @@ NAN_METHOD(S7Client::Delete) {
NAN_METHOD(S7Client::DBGet) {
S7Client *s7client = ObjectWrap::Unwrap<S7Client>(info.Holder());

if (!info[0]->IsInt32() || !info[1]->IsInt32()) {
if (!info[0]->IsInt32()) {
return Nan::ThrowTypeError("Wrong arguments");
}

int size = info[1]->Int32Value();
int size = 65536;
char *bufferData = new char[size];
if (!info[2]->IsFunction()) {
int returnValue = s7client->snap7Client->DBGet(
Expand Down

0 comments on commit 4bd69dd

Please sign in to comment.