Skip to content

Commit c3fcb50

Browse files
committed
Provide more documentation for pm_integer_parse_digit_values
1 parent afac2d6 commit c3fcb50

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/util/pm_integer.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,10 @@ karatsuba_multiply(pm_integer_t *destination, pm_integer_t *left, pm_integer_t *
223223

224224
/**
225225
* The values of a hexadecimal digit, where the index is the ASCII character.
226+
* Note that there's an odd exception here where _ is mapped to 0. This is
227+
* because it's possible for us to end up trying to parse a number that has
228+
* already had an error attached to it, and we want to provide _something_ to
229+
* the user.
226230
*/
227231
static const int8_t pm_integer_parse_digit_values[256] = {
228232
// 0 1 2 3 4 5 6 7 8 9 A B C D E F

0 commit comments

Comments
 (0)