Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiask88 committed Dec 27, 2024
1 parent 4b962de commit 5a1617b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/node_snap7_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,7 @@ Napi::Value S7Client::ListBlocksOfType(const Napi::CallbackInfo &info) {
return env.Undefined();
}

int BlockNum = sizeof(TS7BlocksOfType) / sizeof(PS7BlocksOfType);
int BlockNum = sizeof(TS7BlocksOfType) / sizeof(word);
PS7BlocksOfType BlockList = new TS7BlocksOfType[BlockNum];
IOWorker* worker = new IOWorker(env, this, DataIOFunction::LISTBLOCKSOFTYPE
, BlockList, info[0].As<Napi::Number>().Int32Value(), BlockNum);
Expand Down
3 changes: 2 additions & 1 deletion src/node_snap7_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,8 @@ void CallJsRW(Napi::Env env, Napi::Function callback, Context* context, DataType
rw_tag_obj.Set("Size", Napi::Number::New(env, data->PTag->Size));
rw_tag_obj.Set("WordLen", Napi::Number::New(env, data->PTag->WordLen));

int byteCount, size;
int byteCount;
size_t size;
byteCount = S7Server::GetByteCountFromWordLen(data->PTag->WordLen);
size = byteCount * data->PTag->Size;
void* pUsrData = data->pUsrData;
Expand Down

0 comments on commit 5a1617b

Please sign in to comment.