From bc6df356f5ad64eebebcb14b165fd06f3eae4932 Mon Sep 17 00:00:00 2001 From: Stefan Lau Date: Thu, 14 Nov 2013 13:56:26 +0100 Subject: [PATCH] fix argument index for filter parameter --- src/Canvas.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Canvas.cc b/src/Canvas.cc index 3a88b41..f1be156 100644 --- a/src/Canvas.cc +++ b/src/Canvas.cc @@ -277,7 +277,7 @@ NAN_METHOD(Canvas::ToBuffer) { if (!args[2]->StrictEquals(Undefined())) { if (args[2]->IsUint32()) { - filter = args[1]->Uint32Value(); + filter = args[2]->Uint32Value(); } else { return NanThrowTypeError("Invalid filter value."); }