Commit d46a1447 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

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

parent 72d2b286
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
*/ */
#include "pp.h" #include "pp.h"
#include "pp-cctype.h"
#include <Lexer.h> #include <Lexer.h>
#include <Token.h> #include <Token.h>
...@@ -702,7 +703,7 @@ bool Preprocessor::markGeneratedTokens(bool markGeneratedTokens, ...@@ -702,7 +703,7 @@ bool Preprocessor::markGeneratedTokens(bool markGeneratedTokens,
++it; ++it;
for (; it != end; ++it) { for (; it != end; ++it) {
if (! std::isspace(*it)) if (! pp_isspace(*it))
out(' '); out(' ');
else else
...@@ -773,7 +774,7 @@ void Preprocessor::preprocess(const QByteArray &fileName, const QByteArray &sour ...@@ -773,7 +774,7 @@ void Preprocessor::preprocess(const QByteArray &fileName, const QByteArray &sour
++it; ++it;
for (; it != end; ++it) { for (; it != end; ++it) {
if (std::isspace(*it)) if (pp_isspace(*it))
out(*it); out(*it);
else else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment