* UTF8CountChars() was not 64-bit safe (and that in a hard to detect way).
* Automatic white space cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36968 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2004-2008, Haiku, Inc.
|
* Copyright 2004-2010, Haiku, Inc.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef _UTF8_FUNCTIONS_H
|
#ifndef _UTF8_FUNCTIONS_H
|
||||||
@@ -96,7 +96,7 @@ UTF8CountChars(const char *bytes, int32 numBytes)
|
|||||||
uint32 length = 0;
|
uint32 length = 0;
|
||||||
const char *last;
|
const char *last;
|
||||||
if (numBytes < 0)
|
if (numBytes < 0)
|
||||||
last = (const char *)UINT_MAX;
|
last = (const char *)SIZE_MAX;
|
||||||
else
|
else
|
||||||
last = bytes + numBytes - 1;
|
last = bytes + numBytes - 1;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user