mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-19 19:10:17 +00:00
fix assert triggered when called isspace
This commit is contained in:
parent
533ba9824b
commit
f077960aa6
@ -26,7 +26,7 @@ static void SourceData__ctor(struct SourceData* self,
|
||||
self->source = c11_sbuf__submit(&ss);
|
||||
// remove trailing newline
|
||||
int last_index = self->source->size - 1;
|
||||
while(last_index >= 0 && isspace(self->source->data[last_index])) {
|
||||
while(last_index >= 0 && isspace((unsigned char)self->source->data[last_index])) {
|
||||
last_index--;
|
||||
}
|
||||
if(last_index >= 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user