diff --git a/src/blend.cpp b/src/blend.cpp index c71811008d..48f2602731 100644 --- a/src/blend.cpp +++ b/src/blend.cpp @@ -576,7 +576,7 @@ NAN_METHOD(Blend) { baton->palette = Nan::ObjectWrap::Unwrap(palette_val->ToObject(Nan::GetCurrentContext()).ToLocalChecked())->palette(); } - v8::Local mode_val = palette_val = Nan::Get(options, Nan::New("mode").ToLocalChecked()).ToLocalChecked(); + v8::Local mode_val = Nan::Get(options, Nan::New("mode").ToLocalChecked()).ToLocalChecked(); if (!mode_val.IsEmpty() && mode_val->IsString()) { std::string mode_string = TOSTR(mode_val); if (mode_string == "octree" || mode_string == "o") { diff --git a/src/mapnik_image.cpp b/src/mapnik_image.cpp index a797eca5b5..21f773c9a8 100644 --- a/src/mapnik_image.cpp +++ b/src/mapnik_image.cpp @@ -818,7 +818,7 @@ v8::Local Image::_fillSync(Nan::NAN_METHOD_ARGS_TYPE info) { } else if (info[0]->IsInt32()) { - std::int32_t val = Nan::To(info[2]).FromJust(); + std::int32_t val = Nan::To(info[0]).FromJust(); mapnik::fill(*im->this_,val); } else if (info[0]->IsNumber()) @@ -909,7 +909,7 @@ NAN_METHOD(Image::fill) } else if (info[0]->IsInt32()) { - closure->val_32 = Nan::To(info[2]).FromJust(); + closure->val_32 = Nan::To(info[0]).FromJust(); closure->type = FILL_INT32; } else if (info[0]->IsNumber())