diff options
author | Marius Kintel <marius@kintel.net> | 2012-02-19 12:09:02 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-02-19 12:09:02 (GMT) |
commit | c5703b44077ca6185f7611d6ffba68f4955c1cbd (patch) | |
tree | d427746f36983ea977a84e0d04a04d179592ce7c /src/value.cc | |
parent | 955e0f1344d772119e2d7af1afb7658df7e8c43e (diff) |
bugfix: Fix crash bug when using zero scale factors. Reported by Alan Cox
Diffstat (limited to 'src/value.cc')
-rw-r--r-- | src/value.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/value.cc b/src/value.cc index c9dbd55..93c4d5e 100644 --- a/src/value.cc +++ b/src/value.cc @@ -359,11 +359,11 @@ bool Value::getv2(double &x, double &y) const return true; } -bool Value::getv3(double &x, double &y, double &z) const +bool Value::getv3(double &x, double &y, double &z, double defaultval) const { if (this->type == VECTOR && this->vec.size() == 2) { if (getv2(x, y)) { - z = 0; + z = defaultval; return true; } return false; |