From 62697ccf866c90d8a481099609b3807ce0e32d23 Mon Sep 17 00:00:00 2001 From: Anshul Jain Date: Wed, 28 Oct 2015 13:40:19 +0530 Subject: [PATCH] Fix regression in matrix constructor that takes in array of default values --- src/Matrix.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Matrix.cc b/src/Matrix.cc index 46be855..f6f80ca 100755 --- a/src/Matrix.cc +++ b/src/Matrix.cc @@ -124,6 +124,8 @@ NAN_METHOD(Matrix::New) { info[2]->IntegerValue()); } else if (info.Length() == 4 && info[0]->IsInt32() && info[1]->IsInt32() && info[2]->IsInt32() && info[3]->IsArray()) { + mat = new Matrix(info[0]->IntegerValue(), info[1]->IntegerValue(), + info[2]->IntegerValue(), info[3]->ToObject()); } else { // if (info.Length() == 5) { Matrix *other = Nan::ObjectWrap::Unwrap(info[0]->ToObject()); int x = info[1]->IntegerValue();