mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 16:47:28 +01:00
Track copy_from32 bytes remaining after suspend.
This commit is contained in:
1 parent
8c5b50ef1f
commit
d83cf7f3d5
6 files changed
+27
-5
No files matched your search
+7
-1
@@ -125,6 +125,8 @@ typedef struct {
|
||||
struct {
|
||||
puffs_flate_status status;
|
||||
uint32_t magic;
|
||||
uint64_t scratch;
|
||||
|
||||
uint32_t f_bits;
|
||||
uint32_t f_n_bits;
|
||||
|
||||
@@ -512,7 +514,10 @@ puffs_flate_status puffs_flate_decoder_decode_uncompressed(
|
||||
}
|
||||
PUFFS_COROUTINE_STATE(5);
|
||||
{
|
||||
size_t t_4 = ((((uint32_t)(v_n1)) << 8) | ((uint32_t)(v_n0)));
|
||||
self->private_impl.scratch =
|
||||
((((uint32_t)(v_n1)) << 8) | ((uint32_t)(v_n0)));
|
||||
PUFFS_COROUTINE_STATE(6);
|
||||
size_t t_4 = self->private_impl.scratch;
|
||||
if (t_4 > b_wend_dst - b_wptr_dst) {
|
||||
t_4 = b_wend_dst - b_wptr_dst;
|
||||
status = PUFFS_FLATE_SUSPENSION_SHORT_WRITE;
|
||||
@@ -525,6 +530,7 @@ puffs_flate_status puffs_flate_decoder_decode_uncompressed(
|
||||
b_wptr_dst += t_4;
|
||||
b_rptr_src += t_4;
|
||||
if (status) {
|
||||
self->private_impl.scratch = t_4;
|
||||
goto suspend;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,6 +126,8 @@ typedef struct {
|
||||
struct {
|
||||
puffs_gif_status status;
|
||||
uint32_t magic;
|
||||
uint64_t scratch;
|
||||
|
||||
uint32_t f_literal_width;
|
||||
uint8_t f_stack[4096];
|
||||
uint8_t f_suffixes[4096];
|
||||
@@ -158,6 +160,8 @@ typedef struct {
|
||||
struct {
|
||||
puffs_gif_status status;
|
||||
uint32_t magic;
|
||||
uint64_t scratch;
|
||||
|
||||
uint32_t f_width;
|
||||
uint32_t f_height;
|
||||
uint8_t f_background_color_index;
|
||||
|
||||
Reference in new issue
Block a user