Add return 0 in hex_digit_to_int

git-svn-id: https://cld2.googlecode.com/svn/trunk@6 b252ecd4-b096-bf77-eb8e-91563289f87e
This commit is contained in:
dsites@google.com
2013-07-02 22:58:59 +00:00
parent f70f2fd4e5
commit a99a20311a

View File

@@ -328,6 +328,7 @@ int hex_digit_to_int(char c) {
if (('0' <= c) && (c <= '9')) {return c - '0';} if (('0' <= c) && (c <= '9')) {return c - '0';}
if (('a' <= c) && (c <= 'f')) {return c - 'a' + 10;} if (('a' <= c) && (c <= 'f')) {return c - 'a' + 10;}
if (('A' <= c) && (c <= 'F')) {return c - 'A' + 10;} if (('A' <= c) && (c <= 'F')) {return c - 'A' + 10;}
return 0;
} }
static int32 strto32_base10(const char* nptr, const char* limit, static int32 strto32_base10(const char* nptr, const char* limit,