[SDK] Minor improvements to CRT, RTL, and headers
Signed-off-by: Quinn Stephens <quinn@osmora.org>
This commit is contained in:
@@ -24,7 +24,9 @@ wcslen (
|
||||
const wchar_t *ptr;
|
||||
|
||||
ptr = str;
|
||||
while (*ptr++);
|
||||
while (*ptr) {
|
||||
ptr++;
|
||||
}
|
||||
|
||||
return ptr - str;
|
||||
}
|
||||
@@ -36,15 +38,14 @@ wcsnlen (
|
||||
)
|
||||
|
||||
{
|
||||
size_t len;
|
||||
const wchar_t *ptr;
|
||||
|
||||
len = 0;
|
||||
while (len < maxlen && *str) {
|
||||
len++;
|
||||
str++;
|
||||
ptr = str;
|
||||
while (maxlen-- && *ptr) {
|
||||
ptr++;
|
||||
}
|
||||
|
||||
return len;
|
||||
return ptr - str;
|
||||
}
|
||||
|
||||
int
|
||||
|
Reference in New Issue
Block a user