From 787572c07a359ff677d81ec9f80c96e69a7d3ead Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 22 Aug 2012 00:13:19 -0400 Subject: Bugfix: rotate() with a vector argument with less that 3 elements used uninitialized variables, ending up being non-deterministic. Fixes #152 diff --git a/src/transform.cc b/src/transform.cc index 5b71346..0f678c5 100644 --- a/src/transform.cc +++ b/src/transform.cc @@ -98,7 +98,9 @@ AbstractNode *TransformModule::evaluate(const Context *ctx, const ModuleInstanti Value val_a = c.lookup_variable("a"); if (val_a.type() == Value::VECTOR) { - Eigen::AngleAxisd rotx, roty, rotz; + Eigen::AngleAxisd rotx(0, Vector3d::UnitX()); + Eigen::AngleAxisd roty(0, Vector3d::UnitY()); + Eigen::AngleAxisd rotz(0, Vector3d::UnitZ()); double a; if (val_a.toVector().size() > 0) { val_a.toVector()[0].getDouble(a); -- cgit v0.10.1