diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-04-26 14:16:25 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-04-26 16:10:53 +0200 |
commit | d5dd183f3622002fbc4ae175045a3ebce4eeeb05 (patch) | |
tree | 4ae8cd1a084b937fa7bc5919c42fd5f67889c1ff /lib.c | |
parent | 28825acae8ee95543d4dc4f2c38e9711d4d4a420 (diff) |
treewide: address various sign-compare warnings
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -888,7 +888,7 @@ uc_splice(uc_vm *vm, size_t nargs) if (remlen < 0) remlen = 0; } - else if ((uint64_t)remlen > arrlen - ofs) { + else if ((uint64_t)remlen > arrlen - (uint64_t)ofs) { remlen = arrlen - ofs; } @@ -1025,7 +1025,7 @@ uc_substr(uc_vm *vm, size_t nargs) if (sublen < 0) sublen = 0; } - else if ((uint64_t)sublen > len - ofs) { + else if ((uint64_t)sublen > len - (uint64_t)ofs) { sublen = len - ofs; } |