diff --git a/c_src/evision.cpp b/c_src/evision.cpp index 28b0bd75..bbd32ec0 100644 --- a/c_src/evision.cpp +++ b/c_src/evision.cpp @@ -869,7 +869,7 @@ static bool evision_to(ErlNifEnv *env, ERL_NIF_TERM o, Mat& m, const ArgInfo& in return false; } } - for (i = sz; i < 4; i++) { + for (i = sz; i < sz2; i++) { m.at(i) = 0.0; } return true;