Skip to content

Commit

Permalink
fix(lpb_tointegerx): filter out the malformat, such as, #a, #-aaa... (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoujiexiong authored Jun 19, 2024
1 parent 5e99872 commit 3f9ffd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pb.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ static uint64_t lpb_tointegerx(lua_State *L, int idx, int *isint) {
} else {
for (; *s != '\0'; ++s) {
int n = lpb_hexchar(*s);
if (n < 0 || n > 10) break;
if (n < 0 || n > 9) break;
v = v * 10 + n;
}
}
Expand Down

0 comments on commit 3f9ffd4

Please sign in to comment.