summaryrefslogtreecommitdiff
path: root/src/expr.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-02-14 00:33:44 (GMT)
committerMarius Kintel <marius@kintel.net>2012-02-14 00:33:44 (GMT)
commitf61c9c9fbc1394f530e8166837ff8d69bf8e2561 (patch)
tree1de21c7d0ca5efa6c1af76b94c0c5e95b42233b9 /src/expr.cc
parenta83fda0c3d9e92a6e47622cd1c2fdeebdfbb8c1a (diff)
parentd4efb54284f0781aee40cb660712fa15256676df (diff)
Merge branch 'master' of https://github.com/clothbot/openscad into clothbot-master
Conflicts: scripts/macosx-build-dependencies.sh
Diffstat (limited to 'src/expr.cc')
-rw-r--r--src/expr.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/expr.cc b/src/expr.cc
index 66a0d11..671553c 100644
--- a/src/expr.cc
+++ b/src/expr.cc
@@ -86,8 +86,8 @@ Value Expression::evaluate(const Context *context) const
return *v1.vec[i];
}
if (v1.type == Value::STRING && v2.type == Value::NUMBER) {
- int i = int(v2.num);
- if (i >= 0 && i < v1.text.size())
+ unsigned int i = int(v2.num);
+ if (i < v1.text.size())
return Value(v1.text.substr(i, 1));
}
return Value();
contact: Jan Huwald // Impressum