From 76d7a035bdb0d0ad2c3f99a929ba1358b7cf364e Mon Sep 17 00:00:00 2001 From: TuxSH Date: Wed, 7 Jun 2017 01:06:39 +0200 Subject: [PATCH] Fix country/state id spoofing --- sysmodules/rosalina/kernel_extension/source/ipc.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/sysmodules/rosalina/kernel_extension/source/ipc.c b/sysmodules/rosalina/kernel_extension/source/ipc.c index 9fbb51d..9f8f296 100644 --- a/sysmodules/rosalina/kernel_extension/source/ipc.c +++ b/sysmodules/rosalina/kernel_extension/source/ipc.c @@ -220,15 +220,12 @@ bool doLangEmu(Result *res, Handle handle, u32 *cmdbuf) else if(cmdbuf[1] == 4 && cmdbuf[2] == 0xB0000 && cmdbuf[3] == 0x4C && (attribs->mask & 0xC)) { u8 *ptr = (u8 *)cmdbuf[4]; - *res = SendSyncRequest(handle); - flushEntireDataCache(); // looks like it's needed. WTF?! - if(*res == 0) - { - if(attribs->mask & 4) - ptr[3] = attribs->country; - if(attribs->mask & 8) - ptr[2] = attribs->state; - } + if(attribs->mask & 4) + ptr[3] = attribs->country; + if(attribs->mask & 8) + ptr[2] = attribs->state; + + ptr[0] = ptr[1] = 0; } else skip = false;