ICU-2135 Fixed the case where u_uastrncpy would read one past the end of the array.

X-SVN-Rev: 9799
This commit is contained in:
George Rhoten 2002-08-27 23:03:45 +00:00
parent 99641b2420
commit 5b453f0ece

View File

@ -763,7 +763,7 @@ static int32_t u_astrnlen(const char *s1, int32_t n)
if (s1)
{
while (*(s1++) && n--)
while (n-- && *(s1++))
{
len++;
}