diff options
author | Bernard Normier <bernard@zeroc.com> | 2005-06-20 16:38:15 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2005-06-20 16:38:15 +0000 |
commit | 1efe346edff0282be4741bc68bfaaf0c97a5cdca (patch) | |
tree | 7c2a9c16f9da3140b554341fd47e03b446e38472 /cpp/src/IceUtil/InputUtil.cpp | |
parent | Bug fix for bug #377 (diff) | |
download | ice-1efe346edff0282be4741bc68bfaaf0c97a5cdca.tar.bz2 ice-1efe346edff0282be4741bc68bfaaf0c97a5cdca.tar.xz ice-1efe346edff0282be4741bc68bfaaf0c97a5cdca.zip |
Improved fix for bug #377
Diffstat (limited to 'cpp/src/IceUtil/InputUtil.cpp')
-rw-r--r-- | cpp/src/IceUtil/InputUtil.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/cpp/src/IceUtil/InputUtil.cpp b/cpp/src/IceUtil/InputUtil.cpp index 39de0ac168e..00dbc5e61fa 100644 --- a/cpp/src/IceUtil/InputUtil.cpp +++ b/cpp/src/IceUtil/InputUtil.cpp @@ -82,18 +82,15 @@ strToInt64Impl(const char* s, char** endptr, int base) base = 8; ++s; - if(*s == '\0') + // + // We have at least this zero + // + if(endptr) { - // - // Just '0' - // - if(endptr) - { - *endptr = const_cast<char *>(s); - } - return 0; + *endptr = const_cast<char *>(s); } - else if(*s == 'x' || *s == 'X') + + if(*s == 'x' || *s == 'X') { base = 16; ++s; @@ -116,7 +113,7 @@ strToInt64Impl(const char* s, char** endptr, int base) if(*s == '\0') { // - // We did not read any digit so we don't update endptr + // We did not read any new digit so we don't update endptr // return 0; } |