Skip to content

Commit

Permalink
Merge pull request #1914 from asottile/fix_charset_unsigned_char
Browse files Browse the repository at this point in the history
Handle signed char when considering @charset
  • Loading branch information
xzyfer committed Feb 9, 2016
2 parents 601be96 + e9f4310 commit 3054e97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ namespace Sass {
// search for unicode char
for(const char& chr : wbuf.buffer) {
// skip all ascii chars
if (chr >= 0) continue;
// static cast to unsigned to handle `char` being signed / unsigned
if (static_cast<unsigned>(chr) < 128) continue;
// declare the charset
if (output_style() != COMPRESSED)
charset = "@charset \"UTF-8\";"
Expand Down

0 comments on commit 3054e97

Please sign in to comment.