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



commit 6b0d5a76ee2060e233edf1e2a49cdc5269b34ddc
Author: Fabien Parent <parent f gmail com>
Date:   Mon Oct 28 15:57:00 2013 +0100

    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 files changed, 1 insertions(+), 1 deletions(-)
---
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;
         }
     }


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