Skip to content

Commit 433fcc4

Browse files
committed
Guard against assert in 'isspace'.
1 parent 4f337c7 commit 433fcc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sbml/html2md/html2md.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ bool Converter::ParseCharInTag(char ch) {
483483
}
484484

485485
// Handle whitespace: skip leading whitespace, keep others
486-
if (isspace(ch) && skipping_leading_whitespace) {
486+
if (ch >= -1 && ch <= 255 && isspace(ch) && skipping_leading_whitespace) {
487487
return true; // Ignore leading whitespace
488488
}
489489

0 commit comments

Comments
 (0)