Commit c2e0383
committed
Fix the conversion process from an integer to a hexadecimal string
The original implementation of __str_base16(), which converts
integers to hexadecimal strings, causes errors when processing
negative integers.
It produces redundant 'f' characters at the beginning of the
converted string due to sign extension and results in unexpected
output when calling printf() or sprintf().
Therefore, this commit fixes it and ensure correct conversion.1 parent 861d7d2 commit c2e0383
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
| 182 | + | |
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
| |||
0 commit comments