diff options
author | Andrew Plumb <andrew@plumb.org> | 2012-02-13 16:23:18 (GMT) |
---|---|---|
committer | Andrew Plumb <andrew@plumb.org> | 2012-02-13 16:23:18 (GMT) |
commit | d4efb54284f0781aee40cb660712fa15256676df (patch) | |
tree | 11f0f6ab56cd78fa604f206aba19c18748d6236d /src/expr.cc | |
parent | b633845e55c1733ecd9fa4a01606fd7bdafacc48 (diff) |
Cleaned up unsigned int compiler warnings
Diffstat (limited to 'src/expr.cc')
-rw-r--r-- | src/expr.cc | 4 |
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(); |