Browse Source

[master] make the use of isspace() more portable regarding signedness of char

the old code seems to be rejected in an ARM environment

okayed on jabber.
JINMEI Tatuya 12 years ago
parent
commit
d8a4ee2657
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/lib/util/encode/base_n.cc

+ 2 - 1
src/lib/util/encode/base_n.cc

@@ -291,7 +291,8 @@ BaseNTransformer<BitsPerChunk, BaseZeroCode, Encoder, Decoder>::decode(
                 isc_throw(BadValue, "Too many " << algorithm
                           << " padding characters: " << input);
             }
-        } else if (ch < 0 || !isspace(ch)) {
+        } else if (!(ch > 0 && isspace(ch))) {
+            // see the note for DecodeNormalizer::skipSpaces() above for ch > 0
             break;
         }
         ++srit;