Repository: lucy-clownfish Updated Branches: refs/heads/master 5bed14937 -> 36f36eafa
Off-by-one error in String#To_I64 Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/c66b9f92 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/c66b9f92 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/c66b9f92 Branch: refs/heads/master Commit: c66b9f9214797fb0e1f8e07cae99052bbe2a84ae Parents: 5bed149 Author: Nick Wellnhofer <[email protected]> Authored: Sat Aug 9 18:15:39 2014 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Mon Apr 20 21:21:01 2015 +0200 ---------------------------------------------------------------------- runtime/core/Clownfish/String.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/c66b9f92/runtime/core/Clownfish/String.c ---------------------------------------------------------------------- diff --git a/runtime/core/Clownfish/String.c b/runtime/core/Clownfish/String.c index 3b7fe7b..d5a662b 100644 --- a/runtime/core/Clownfish/String.c +++ b/runtime/core/Clownfish/String.c @@ -255,7 +255,7 @@ Str_BaseX_To_I64_IMP(String *self, uint32_t base) { int32_t addend = isdigit(code_point) ? code_point - '0' : tolower(code_point) - 'a' + 10; - if (addend > (int32_t)base) { break; } + if (addend >= (int32_t)base) { break; } retval *= base; retval += addend; }
