Skip to content

Commit 5180a76

Browse files
committed
Remove unneeded bitwise AND op from UTF-16LE conversion
It's masking off bits which will always be zero anyways.
1 parent 9f1bf8e commit 5180a76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/mbstring/libmbfl/filters/mbfilter_utf16.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ int mbfl_filt_conv_utf16le_wchar_byte2(int c, mbfl_convert_filter *filter)
274274
* Imitating legacy behavior of mbfilter for now; but I am not at all convinced
275275
* that passing character through is the right thing to do. It might be better
276276
* just to return an error status. */
277-
int n = ((filter->cache + ((c & 0xff) << 8)) & MBFL_WCSGROUP_MASK) | MBFL_WCSGROUP_THROUGH;
277+
int n = (filter->cache + ((c & 0xff) << 8)) | MBFL_WCSGROUP_THROUGH;
278278
filter->filter_function = mbfl_filt_conv_utf16le_wchar;
279279
filter->status = 0;
280280
CK((*filter->output_function)(n, filter->data));

0 commit comments

Comments
 (0)