[SDK] Minor improvements to CRT, RTL, and headers

Signed-off-by: Quinn Stephens <quinn@osmora.org>
This commit is contained in:
2024-11-16 07:10:11 -05:00
parent e81100b2e5
commit e3f81a4c08
13 changed files with 231 additions and 224 deletions

View File

@@ -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