mirror of
https://github.com/ctruLua/ctruLua.git
synced 2025-10-27 16:39:29 +00:00
Fixed some documentation, added some things to sockets, "Fixed" the ROMFS
The romfs is still not working, but it works better.
This commit is contained in:
parent
e7ff54d58c
commit
6b65df0b8e
10 changed files with 115 additions and 70 deletions
|
|
@ -109,9 +109,13 @@ static int cfgu_getUsername(lua_State *L) {
|
|||
|
||||
CFGU_GetConfigInfoBlk2(0x1C, 0xA0000, (u8*)block);
|
||||
u8 *name = malloc(0x14);
|
||||
utf16_to_utf8(name, block, 0x14);
|
||||
ssize_t len = utf16_to_utf8(name, block, 0x14);
|
||||
if (len < 0) {
|
||||
lua_pushstring(L, "");
|
||||
return 1;
|
||||
}
|
||||
|
||||
lua_pushlstring(L, (const char *)name, 0x14); // The username is only 0x14 characters long.
|
||||
lua_pushlstring(L, (const char *)name, len); // The username is only 0x14 characters long.
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue