summaryrefslogtreecommitdiff
path: root/cpp/src/IceUtil/InputUtil.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2005-06-20 16:38:15 +0000
committerBernard Normier <bernard@zeroc.com>2005-06-20 16:38:15 +0000
commit1efe346edff0282be4741bc68bfaaf0c97a5cdca (patch)
tree7c2a9c16f9da3140b554341fd47e03b446e38472 /cpp/src/IceUtil/InputUtil.cpp
parentBug fix for bug #377 (diff)
downloadice-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.cpp19
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;
}