[PATCH] 710828 Fix a condition in UString::is_integer



    * src/common/nmv-ustring.cc (UString::is_integer): Replace a 'and' by a
    'or' in the condition checking for non-numerical characters.
---
 src/common/nmv-ustring.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/common/nmv-ustring.cc b/src/common/nmv-ustring.cc
index b337d51..f5dfe49 100644
--- a/src/common/nmv-ustring.cc
+++ b/src/common/nmv-ustring.cc
@@ -136,7 +136,7 @@ UString::is_integer () const
 
     for (UString::size_type i = 0; i < size (); ++i) {
         c = (*this)[i];
-        if (c < '0' && c > '9') {
+        if (c < '0' || c > '9') {
             return false;
         }
     }
-- 
1.8.4.rc3



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]