Skip to content

Commit

Permalink
When flushing CP5022x conversion filter, also flush next filter in chain
Browse files Browse the repository at this point in the history
All the mbstring encoding conversion filters do this. I missed it when
adding a flush function for CP5022x.
  • Loading branch information
alexdowad committed Jun 17, 2021
1 parent caeaa66 commit 958ef47
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c
Expand Up @@ -315,6 +315,11 @@ static int mbfl_filt_conv_cp5022x_wchar_flush(mbfl_convert_filter *filter)
/* 2-byte (JIS X 0208 or 0212) character was truncated */
CK((*filter->output_function)(filter->cache | MBFL_WCSGROUP_THROUGH, filter->data));
}

if (filter->flush_function) {
(*filter->flush_function)(filter->data);
}

return 0;
}

Expand Down

0 comments on commit 958ef47

Please sign in to comment.