diff --git a/Userland/Libraries/LibC/wchar.cpp b/Userland/Libraries/LibC/wchar.cpp index dd7ca983cf..d12d224e90 100644 --- a/Userland/Libraries/LibC/wchar.cpp +++ b/Userland/Libraries/LibC/wchar.cpp @@ -319,10 +319,12 @@ int wcscoll(const wchar_t* ws1, const wchar_t* ws2) return wcscmp(ws1, ws2); } -int wctob(wint_t) +int wctob(wint_t c) { - dbgln("FIXME: Implement wctob()"); - TODO(); + if (c > 0x7f) + return EOF; + + return static_cast(c); } int mbsinit(const mbstate_t* state)