From 9a3067caaf17bb7c1c6a0645b7c202ce4ea54ffa Mon Sep 17 00:00:00 2001 From: ser1zw Date: Mon, 3 Jan 2011 13:47:34 +0900 Subject: [PATCH] modified CvMat#and --- ext/cvmat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/cvmat.cpp b/ext/cvmat.cpp index 8d6aa88..747b9bc 100644 --- a/ext/cvmat.cpp +++ b/ext/cvmat.cpp @@ -1734,7 +1734,7 @@ rb_and(int argc, VALUE *argv, VALUE self) { VALUE val, mask, dest; rb_scan_args(argc, argv, "11", &val, &mask); - dest = new_object(cvGetSize(CVARR(self)), cvGetElemType(CVARR(self))); + dest = copy(self); if (rb_obj_is_kind_of(val, rb_klass)) cvAnd(CVARR(self), CVARR(val), CVARR(dest), MASK(mask)); else