Propagate error checks for mbfl_filt_conv_illegal_output()

This commit is contained in:
nielsdos 2023-03-02 14:31:15 +01:00 committed by Alex Dowad
parent 263655a520
commit d66ca5dabb
2 changed files with 4 additions and 4 deletions

View file

@ -76,7 +76,7 @@ int mbfl_filt_conv_any_7bit(int c, mbfl_convert_filter *filter)
if (c >= 0 && c < 0x80) { if (c >= 0 && c < 0x80) {
CK((*filter->output_function)(c, filter->data)); CK((*filter->output_function)(c, filter->data));
} else { } else {
mbfl_filt_conv_illegal_output(c, filter); CK(mbfl_filt_conv_illegal_output(c, filter));
} }
return 0; return 0;
} }

View file

@ -462,7 +462,7 @@ int mbfilter_unicode2sjis_emoji_kddi(int c, int *s1, mbfl_convert_filter *filter
/* If none of the KDDI national flag emoji matched, then we have no way /* If none of the KDDI national flag emoji matched, then we have no way
* to convert the previous codepoint... */ * to convert the previous codepoint... */
mbfl_filt_conv_illegal_output(c1, filter); CK(mbfl_filt_conv_illegal_output(c1, filter));
} }
if (c == '#' || (c >= '0' && c <= '9')) { if (c == '#' || (c >= '0' && c <= '9')) {
@ -534,7 +534,7 @@ int mbfilter_unicode2sjis_emoji_sb(int c, int *s1, mbfl_convert_filter *filter)
/* If none of the SoftBank national flag emoji matched, then we have no way /* If none of the SoftBank national flag emoji matched, then we have no way
* to convert the previous codepoint... */ * to convert the previous codepoint... */
mbfl_filt_conv_illegal_output(c1, filter); CK(mbfl_filt_conv_illegal_output(c1, filter));
} }
if (c == '#' || (c >= '0' && c <= '9')) { if (c == '#' || (c >= '0' && c <= '9')) {
@ -855,7 +855,7 @@ int mbfl_filt_conv_sjis_mobile_flush(mbfl_convert_filter *filter)
} else if (filter->status == 2) { } else if (filter->status == 2) {
/* First of a pair of Regional Indicator codepoints came at the end of a string */ /* First of a pair of Regional Indicator codepoints came at the end of a string */
filter->cache = filter->status = 0; filter->cache = filter->status = 0;
mbfl_filt_conv_illegal_output(c1, filter); CK(mbfl_filt_conv_illegal_output(c1, filter));
} }
if (filter->flush_function) { if (filter->flush_function) {