lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [1/2] lucy-clownfish git commit: Off-by-one error in String#To_I64
Date Mon, 20 Apr 2015 19:27:17 GMT
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 <wellnhofer@aevum.de>
Authored: Sat Aug 9 18:15:39 2014 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
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;
         }


Mime
View raw message