Fixed possible crash in std::isspace(ch) when ch is a unicode char.

This commit is contained in:
Roberto Raggi
2009-05-15 16:01:02 +02:00
parent 72d2b286dc
commit d46a1447f1

View File

@@ -47,6 +47,7 @@
*/
#include "pp.h"
#include "pp-cctype.h"
#include <Lexer.h>
#include <Token.h>
@@ -702,7 +703,7 @@ bool Preprocessor::markGeneratedTokens(bool markGeneratedTokens,
++it;
for (; it != end; ++it) {
if (! std::isspace(*it))
if (! pp_isspace(*it))
out(' ');
else
@@ -773,7 +774,7 @@ void Preprocessor::preprocess(const QByteArray &fileName, const QByteArray &sour
++it;
for (; it != end; ++it) {
if (std::isspace(*it))
if (pp_isspace(*it))
out(*it);
else