diff --git a/internal/cgen/base/io-private.h b/internal/cgen/base/io-private.h index ad0c2b64..0fb00c54 100644 --- a/internal/cgen/base/io-private.h +++ b/internal/cgen/base/io-private.h @@ -160,7 +160,7 @@ wuffs_base__io_writer__limit(uint8_t** ptr_io2_w, static inline uint32_t // wuffs_base__io_writer__limited_copy_u32_from_history(uint8_t** ptr_iop_w, - uint8_t* io1_w, + uint8_t* io0_w, uint8_t* io2_w, uint32_t length, uint32_t distance) { @@ -168,7 +168,7 @@ wuffs_base__io_writer__limited_copy_u32_from_history(uint8_t** ptr_iop_w, return 0; } uint8_t* p = *ptr_iop_w; - if ((size_t)(p - io1_w) < (size_t)(distance)) { + if ((size_t)(p - io0_w) < (size_t)(distance)) { return 0; } uint8_t* q = p - distance; @@ -205,10 +205,10 @@ wuffs_base__io_writer__limited_copy_u32_from_history(uint8_t** ptr_iop_w, // The caller needs to prove that: // - length <= (io2_w - *ptr_iop_w) // - distance >= 1 -// - distance <= (*ptr_iop_w - io1_w) +// - distance <= (*ptr_iop_w - io0_w) static inline uint32_t // wuffs_base__io_writer__limited_copy_u32_from_history_fast(uint8_t** ptr_iop_w, - uint8_t* io1_w, + uint8_t* io0_w, uint8_t* io2_w, uint32_t length, uint32_t distance) { @@ -240,11 +240,11 @@ wuffs_base__io_writer__limited_copy_u32_from_history_fast(uint8_t** ptr_iop_w, // The caller needs to prove that: // - (length + 8) <= (io2_w - *ptr_iop_w) // - distance == 1 -// - distance <= (*ptr_iop_w - io1_w) +// - distance <= (*ptr_iop_w - io0_w) static inline uint32_t // wuffs_base__io_writer__limited_copy_u32_from_history_8_byte_chunks_distance_1_fast( uint8_t** ptr_iop_w, - uint8_t* io1_w, + uint8_t* io0_w, uint8_t* io2_w, uint32_t length, uint32_t distance) { @@ -280,11 +280,11 @@ wuffs_base__io_writer__limited_copy_u32_from_history_8_byte_chunks_distance_1_fa // The caller needs to prove that: // - (length + 8) <= (io2_w - *ptr_iop_w) // - distance >= 8 -// - distance <= (*ptr_iop_w - io1_w) +// - distance <= (*ptr_iop_w - io0_w) static inline uint32_t // wuffs_base__io_writer__limited_copy_u32_from_history_8_byte_chunks_fast( uint8_t** ptr_iop_w, - uint8_t* io1_w, + uint8_t* io0_w, uint8_t* io2_w, uint32_t length, uint32_t distance) { diff --git a/release/c/wuffs-unsupported-snapshot.c b/release/c/wuffs-unsupported-snapshot.c index fdfea411..96c0fb2f 100644 --- a/release/c/wuffs-unsupported-snapshot.c +++ b/release/c/wuffs-unsupported-snapshot.c @@ -11035,7 +11035,7 @@ wuffs_base__io_writer__limit(uint8_t** ptr_io2_w, static inline uint32_t // wuffs_base__io_writer__limited_copy_u32_from_history(uint8_t** ptr_iop_w, - uint8_t* io1_w, + uint8_t* io0_w, uint8_t* io2_w, uint32_t length, uint32_t distance) { @@ -11043,7 +11043,7 @@ wuffs_base__io_writer__limited_copy_u32_from_history(uint8_t** ptr_iop_w, return 0; } uint8_t* p = *ptr_iop_w; - if ((size_t)(p - io1_w) < (size_t)(distance)) { + if ((size_t)(p - io0_w) < (size_t)(distance)) { return 0; } uint8_t* q = p - distance; @@ -11080,10 +11080,10 @@ wuffs_base__io_writer__limited_copy_u32_from_history(uint8_t** ptr_iop_w, // The caller needs to prove that: // - length <= (io2_w - *ptr_iop_w) // - distance >= 1 -// - distance <= (*ptr_iop_w - io1_w) +// - distance <= (*ptr_iop_w - io0_w) static inline uint32_t // wuffs_base__io_writer__limited_copy_u32_from_history_fast(uint8_t** ptr_iop_w, - uint8_t* io1_w, + uint8_t* io0_w, uint8_t* io2_w, uint32_t length, uint32_t distance) { @@ -11115,11 +11115,11 @@ wuffs_base__io_writer__limited_copy_u32_from_history_fast(uint8_t** ptr_iop_w, // The caller needs to prove that: // - (length + 8) <= (io2_w - *ptr_iop_w) // - distance == 1 -// - distance <= (*ptr_iop_w - io1_w) +// - distance <= (*ptr_iop_w - io0_w) static inline uint32_t // wuffs_base__io_writer__limited_copy_u32_from_history_8_byte_chunks_distance_1_fast( uint8_t** ptr_iop_w, - uint8_t* io1_w, + uint8_t* io0_w, uint8_t* io2_w, uint32_t length, uint32_t distance) { @@ -11155,11 +11155,11 @@ wuffs_base__io_writer__limited_copy_u32_from_history_8_byte_chunks_distance_1_fa // The caller needs to prove that: // - (length + 8) <= (io2_w - *ptr_iop_w) // - distance >= 8 -// - distance <= (*ptr_iop_w - io1_w) +// - distance <= (*ptr_iop_w - io0_w) static inline uint32_t // wuffs_base__io_writer__limited_copy_u32_from_history_8_byte_chunks_fast( uint8_t** ptr_iop_w, - uint8_t* io1_w, + uint8_t* io0_w, uint8_t* io2_w, uint32_t length, uint32_t distance) {