Don't test for the 0 character on the wrong half of the UCS2-LE char.

Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
Peter Jones 2015-11-17 11:41:12 -05:00
parent 4d70bbd894
commit 000261ca88

2
ucs2.h
View File

@ -106,8 +106,6 @@ count_ucs2_strings(UINT8 *data, UINTN data_size)
if (data[i] != 0) if (data[i] != 0)
return 0; return 0;
} else if (data[i] == 0) { } else if (data[i] == 0) {
if (i+1 >= data_size || data[i+1] != 0)
return 0;
last_nul_pos = i; last_nul_pos = i;
num_nuls++; num_nuls++;
} }