Parcourir la 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 il y a 12 ans
Parent
commit
d8a4ee2657
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  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;