diff options
Diffstat (limited to 'src/serd_internal.h')
-rw-r--r-- | src/serd_internal.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/serd_internal.h b/src/serd_internal.h index 0bc1cf42..243c1327 100644 --- a/src/serd_internal.h +++ b/src/serd_internal.h @@ -151,13 +151,11 @@ serd_byte_source_advance(SerdByteSource* source) : SERD_FAILURE; } } - } else if (source->eof) { - st = SERD_FAILURE; // Can't read past end of string - } else { + } else if (!source->eof) { ++source->read_head; // Move to next character in string } - return st; + return source->eof ? SERD_FAILURE : st; } /* Stack */ |