mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-27 03:11:46 +00:00
...
This commit is contained in:
parent
f03813e588
commit
56fe60ae84
1 changed files with 1 additions and 1 deletions
|
|
@ -15,7 +15,7 @@ static unsigned int pow10[10] = {
|
|||
static inline unsigned int
|
||||
utoi(uint32_t *buf, unsigned int sz) {
|
||||
unsigned int ans = 0;
|
||||
if (sz < 10) {
|
||||
if (sz < sizeof(pow10)/sizeof(pow10[10])) {
|
||||
for (int i = sz-1, j=0; i >=0; i--, j++) {
|
||||
ans += (buf[i] - '0') * pow10[j];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue