Skip to content

Commit

Permalink
Fix printf(%x) bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
Qingning Huo committed Oct 4, 2024
1 parent 099d4f1 commit fdfe28f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/printf.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ printf(char *fmt, ...)
printint(va_arg(ap, uint64), 10, 0);
i += 2;
} else if(c0 == 'x'){
printint(va_arg(ap, int), 16, 0);
printint(va_arg(ap, uint32), 16, 0);
} else if(c0 == 'l' && c1 == 'x'){
printint(va_arg(ap, uint64), 16, 0);
i += 1;
Expand Down

0 comments on commit fdfe28f

Please # to comment.