Skip to content

Commit

Permalink
Fixed Uint32Value() semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
vlasky committed Dec 16, 2019
1 parent 67843b5 commit 49109da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ NAN_METHOD(decode) {
}
v8::Local<v8::Object> sourceHandle = info[0].As<v8::Object>();
v8::Local<v8::Object> targetHandle = info[1].As<v8::Object>();
const uint8_t qEncoding = info[2]->Uint32Value();
const uint8_t qEncoding = info[2]->Uint32Value(Nan::GetCurrentContext()).FromJust();
v8::Local<v8::Object> tableDecodingHandle = info[3].As<v8::Object>();
v8::Local<v8::Object> tableLegalHandle = info[4].As<v8::Object>();
const uint32_t sourceLength = node::Buffer::Length(sourceHandle);
Expand Down Expand Up @@ -216,7 +216,7 @@ NAN_METHOD(encode) {
}
v8::Local<v8::Object> sourceHandle = info[0].As<v8::Object>();
v8::Local<v8::Object> targetHandle = info[1].As<v8::Object>();
const uint8_t qEncoding = info[2]->Uint32Value();
const uint8_t qEncoding = info[2]->Uint32Value(Nan::GetCurrentContext()).FromJust();
v8::Local<v8::Object> tableEncodingHandle = info[3].As<v8::Object>();
v8::Local<v8::Object> tableLiteralsHandle = info[4].As<v8::Object>();
const uint32_t sourceLength = node::Buffer::Length(sourceHandle);
Expand Down

0 comments on commit 49109da

Please sign in to comment.