Skip to content

Commit 620ebe0

Browse files
committed
IES parser: avoid isspace assert on non-ASCII bytes
1 parent 37a18e6 commit 620ebe0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/nbl/asset/utils/CIESProfileParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ bool CIESProfileParser::parse(CIESProfile& result)
1717
{
1818
auto removeTrailingWhiteChars = [](std::string& str) -> void
1919
{
20-
if (std::isspace(str.back()))
20+
if (!str.empty() && std::isspace(static_cast<unsigned char>(str.back())))
2121
{
2222
auto it = str.rbegin();
2323
while (it != str.rend() && std::isspace(static_cast<unsigned char>(*it)))

0 commit comments

Comments
 (0)