Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion simplecpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,10 @@ class simplecpp::TokenList::Stream {
}

unsigned char peekChar() {
auto ch = static_cast<unsigned char>(peek());
const int pk = peek();
auto ch = static_cast<unsigned char>(pk);
if (pk == EOF)
return ch;

// For UTF-16 encoded files the BOM is 0xfeff/0xfffe. If the
// character is non-ASCII character then replace it with 0xff
Expand Down
Loading