From 0b52e3ee67582cee10a96b9485942eae3c84e3d1 Mon Sep 17 00:00:00 2001 From: clifford Date: Wed, 13 Jan 2010 07:51:42 +0000 Subject: Clifford Wolf: Fixed evaluation of rotate([]) git-svn-id: http://svn.clifford.at/openscad/trunk@271 b57f626f-c46c-0410-a088-ec61d464b74c diff --git a/transform.cc b/transform.cc index 3c09c14..5d85615 100644 --- a/transform.cc +++ b/transform.cc @@ -101,7 +101,7 @@ AbstractNode *TransformModule::evaluate(const Context *ctx, const ModuleInstanti Value val_a = c.lookup_variable("a"); if (val_a.type == Value::VECTOR) { - for (int i = 0; i < 3; i++) { + for (int i = 0; i < 3 && i < val_a.vec.size(); i++) { double a; val_a.vec[i]->getnum(a); double c = cos(a*M_PI/180.0); -- cgit v0.10.1