diff --git a/release/c/wuffs-unsupported-snapshot.c b/release/c/wuffs-unsupported-snapshot.c index c0e825a9..94df71a2 100644 --- a/release/c/wuffs-unsupported-snapshot.c +++ b/release/c/wuffs-unsupported-snapshot.c @@ -21189,7 +21189,7 @@ wuffs_json__decoder__decode_tokens(wuffs_json__decoder* self, switch (coro_susp_point) { WUFFS_BASE__COROUTINE_SUSPENSION_POINT_0; - while (self->private_impl.f_end_of_data) { + if (self->private_impl.f_end_of_data) { status = wuffs_base__make_status(wuffs_base__note__end_of_data); goto ok; } diff --git a/std/json/decode_json.wuffs b/std/json/decode_json.wuffs index 367bfacb..7ad5da4d 100644 --- a/std/json/decode_json.wuffs +++ b/std/json/decode_json.wuffs @@ -145,9 +145,9 @@ pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader, wor var expect : base.u32 var expect_after_value : base.u32 - while this.end_of_data { + if this.end_of_data { return base."@end of data" - } endwhile + } if this.quirk_enabled_allow_leading_ascii_record_separator or this.quirk_enabled_allow_leading_unicode_byte_order_mark {