1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:04:59 +00:00

iLibC: Fix some missed camelCase => snake_case

This commit is contained in:
Andreas Kling 2021-04-29 10:15:28 +02:00
parent bebdf24329
commit 357a455b5c
3 changed files with 10 additions and 10 deletions

View file

@ -874,15 +874,15 @@ int wctomb(char*, wchar_t)
size_t wcstombs(char* dest, const wchar_t* src, size_t max)
{
char* originalDest = dest;
while ((size_t)(dest - originalDest) < max) {
char* original_dest = dest;
while ((size_t)(dest - original_dest) < max) {
StringView v { (const char*)src, sizeof(wchar_t) };
// FIXME: dependent on locale, for now utf-8 is supported.
Utf8View utf8 { v };
if (*utf8.begin() == '\0') {
*dest = '\0';
return (size_t)(dest - originalDest); // Exclude null character in returned size
return (size_t)(dest - original_dest); // Exclude null character in returned size
}
for (auto byte : utf8) {