* mailbox/mutil.c (mu_hexstr2ul): Properly cast the expression
before doing the comparison.
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -57,7 +57,7 @@ size_t mu_hexstr2ul(unsigned long* ul, const char* hex, size_t len) | ... | @@ -57,7 +57,7 @@ size_t mu_hexstr2ul(unsigned long* ul, const char* hex, size_t len) |
57 | { | 57 | { |
58 | unsigned long v = mu_hex2ul(hex[r]); | 58 | unsigned long v = mu_hex2ul(hex[r]); |
59 | 59 | ||
60 | if(v == -1) | 60 | if(v == (unsigned long)-1) |
61 | return r; | 61 | return r; |
62 | 62 | ||
63 | *ul = *ul * 16 + v; | 63 | *ul = *ul * 16 + v; | ... | ... |
-
Please register or sign in to post a comment