diff --git a/lang/builtin/builtin.go b/lang/builtin/builtin.go index ea398682..2ca92724 100644 --- a/lang/builtin/builtin.go +++ b/lang/builtin/builtin.go @@ -42,6 +42,7 @@ var Statuses = [...]string{ `"?initialize not called"`, `"?interleaved coroutine calls"`, `"?not enough data"`, + `"?too much data"`, } // TODO: a collection of forbidden variable names like and, or, not, as, ref, diff --git a/release/c/wuffs-unsupported-snapshot.c b/release/c/wuffs-unsupported-snapshot.c index c6c0f66c..322e33a5 100644 --- a/release/c/wuffs-unsupported-snapshot.c +++ b/release/c/wuffs-unsupported-snapshot.c @@ -186,6 +186,7 @@ extern const char* wuffs_base__error__initialize_falsely_claimed_already_zeroed; extern const char* wuffs_base__error__initialize_not_called; extern const char* wuffs_base__error__interleaved_coroutine_calls; extern const char* wuffs_base__error__not_enough_data; +extern const char* wuffs_base__error__too_much_data; static inline bool // wuffs_base__status__is_complete(wuffs_base__status z) { @@ -3195,8 +3196,6 @@ extern const char* wuffs_gif__error__bad_extension_label; extern const char* wuffs_gif__error__bad_graphic_control; extern const char* wuffs_gif__error__bad_header; extern const char* wuffs_gif__error__bad_literal_width; -extern const char* wuffs_gif__error__not_enough_pixel_data; -extern const char* wuffs_gif__error__too_much_pixel_data; // ---------------- Public Consts @@ -4808,6 +4807,7 @@ const char* wuffs_base__error__initialize_not_called = const char* wuffs_base__error__interleaved_coroutine_calls = "?base: interleaved coroutine calls"; const char* wuffs_base__error__not_enough_data = "?base: not enough data"; +const char* wuffs_base__error__too_much_data = "?base: too much data"; // ---------------- Images @@ -8583,9 +8583,6 @@ const char* wuffs_gif__error__bad_extension_label = "?gif: bad extension label"; const char* wuffs_gif__error__bad_graphic_control = "?gif: bad graphic control"; const char* wuffs_gif__error__bad_header = "?gif: bad header"; const char* wuffs_gif__error__bad_literal_width = "?gif: bad literal width"; -const char* wuffs_gif__error__not_enough_pixel_data = - "?gif: not enough pixel data"; -const char* wuffs_gif__error__too_much_pixel_data = "?gif: too much pixel data"; const char* wuffs_gif__error__internal_error_inconsistent_ri_wi = "?gif: internal error: inconsistent ri/wi"; @@ -10748,7 +10745,7 @@ label_0_continue:; while (v_src_ri < ((uint64_t)(a_src.len))) { v_src = wuffs_base__slice_u8__subslice_i(a_src, v_src_ri); if (self->private_impl.f_dst_y >= self->private_impl.f_frame_rect_y1) { - return wuffs_gif__error__too_much_pixel_data; + return wuffs_base__error__too_much_data; } v_dst = wuffs_base__table_u8__row(v_tab, self->private_impl.f_dst_y); v_i = (((uint64_t)(self->private_impl.f_dst_x)) * diff --git a/std/gif/decode_gif.wuffs b/std/gif/decode_gif.wuffs index dbeb1e6d..5f6c7811 100644 --- a/std/gif/decode_gif.wuffs +++ b/std/gif/decode_gif.wuffs @@ -19,8 +19,6 @@ pub status "?bad extension label" pub status "?bad graphic control" pub status "?bad header" pub status "?bad literal width" -pub status "?not enough pixel data" -pub status "?too much pixel data" pri status "?internal error: inconsistent ri/wi" @@ -797,7 +795,7 @@ pri func decoder.copy_to_image_buffer!(pb ptr base.pixel_buffer, src slice base. src = args.src[src_ri:] if this.dst_y >= this.frame_rect_y1 { - return "?too much pixel data" + return base."?too much data" } // First, copy from src to that part of the frame rect that is inside diff --git a/test/c/std/gif.c b/test/c/std/gif.c index 5e04f2fd..d8e4bb28 100644 --- a/test/c/std/gif.c +++ b/test/c/std/gif.c @@ -1058,7 +1058,7 @@ const char* test_wuffs_gif_decode_too_much_data() { } return do_test_wuffs_gif_decode_expecting( - src, wuffs_gif__error__too_much_pixel_data, true); + src, wuffs_base__error__too_much_data, true); } const char* test_wuffs_gif_frame_dirty_rect() {