Skip to content

Commit ad571f0

Browse files
committed
fix(parser): ensure std::isspace() is called with an unsigned char
1 parent 9cda0ee commit ad571f0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

includes/sjson/parser.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ namespace sjson
351351
if (eof())
352352
return true;
353353

354-
if (std::isspace(m_state.symbol))
354+
if (std::isspace(static_cast<unsigned char>(m_state.symbol)))
355355
{
356356
advance();
357357
continue;
@@ -603,7 +603,7 @@ namespace sjson
603603
break;
604604
}
605605

606-
if (std::isspace(m_state.symbol))
606+
if (std::isspace(static_cast<unsigned char>(m_state.symbol)))
607607
{
608608
end_offset = m_state.offset - 1;
609609
advance();

0 commit comments

Comments
 (0)