DiskProbe:
* The is_valid_utf8(..) is supposed to accept a terminating null byte but was instead looking for a null byte as the first byte. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34191 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
0b0e9179c3
commit
59d398a1ae
@ -40,7 +40,7 @@ is_valid_utf8(uint8 *data, size_t size)
|
||||
{
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
// accept a terminating null byte
|
||||
if (i == size - 1 && data[0] == '\0')
|
||||
if (i == size - 1 && data[i] == '\0')
|
||||
return true;
|
||||
|
||||
if ((data[i] & 0x80) == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user