diff options
author | Daniel Axtens <dja@axtens.net> | 2015-02-20 13:45:06 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-02-23 13:35:50 +1100 |
commit | e4f5a453bb4e8b9ee3820c0f495beff417a867de (patch) | |
tree | 0aa2796bbd84b9f1b640e0a0f01e6f1a24c36afa /libc/stdlib | |
parent | e4ce915ea0631f5b17082aa8c70079b0e9dc33af (diff) | |
download | skiboot-e4f5a453bb4e8b9ee3820c0f495beff417a867de.zip skiboot-e4f5a453bb4e8b9ee3820c0f495beff417a867de.tar.gz skiboot-e4f5a453bb4e8b9ee3820c0f495beff417a867de.tar.bz2 |
Don't recognise a double hex prefix (0x0xNN) as valid.
When autodetecting the base, the code would strip hex prefixes twice.
Now the string is not modified in the detection stage.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'libc/stdlib')
-rw-r--r-- | libc/stdlib/strtol.c | 2 | ||||
-rw-r--r-- | libc/stdlib/strtoul.c | 2 |
2 files changed, 0 insertions, 4 deletions
diff --git a/libc/stdlib/strtol.c b/libc/stdlib/strtol.c index 474597a..e6d4da3 100644 --- a/libc/stdlib/strtol.c +++ b/libc/stdlib/strtol.c @@ -53,8 +53,6 @@ long int strtol(const char *S, char **PTR,int BASE) if ((**PTR == '0') && (*((*PTR)+1) == 'x')) { BASE = 16; - (*PTR)++; - (*PTR)++; } else { diff --git a/libc/stdlib/strtoul.c b/libc/stdlib/strtoul.c index 754e7db..8472668 100644 --- a/libc/stdlib/strtoul.c +++ b/libc/stdlib/strtoul.c @@ -46,8 +46,6 @@ unsigned long int strtoul(const char *S, char **PTR,int BASE) if ((**PTR == '0') && (*((*PTR)+1) == 'x')) { BASE = 16; - (*PTR)++; - (*PTR)++; } else { |