Double the size of launchedPath
This commit is contained in:
parent
9d507e046c
commit
356a94cc2e
@ -109,7 +109,7 @@ bytes_read: .word 0
|
||||
fopen: .ascii "OPEN"
|
||||
.pool
|
||||
|
||||
.area 82, 0
|
||||
.area 2*(80+1), 0
|
||||
fname: .ascii "FILE"
|
||||
.endarea
|
||||
|
||||
|
@ -44,7 +44,7 @@ extern ConfigurationStatus needConfig;
|
||||
extern FirmwareSource firmSource;
|
||||
|
||||
bool isSdMode;
|
||||
u16 launchedPath[41];
|
||||
u16 launchedPath[80+1];
|
||||
BootType bootType;
|
||||
|
||||
void main(int argc, char **argv, u32 magicWord)
|
||||
@ -66,7 +66,7 @@ void main(int argc, char **argv, u32 magicWord)
|
||||
bootType = isNtrBoot ? B9SNTR : B9S;
|
||||
|
||||
u32 i;
|
||||
for(i = 0; i < 40 && argv[0][i] != 0; i++) //Copy and convert the path to UTF-16
|
||||
for(i = 0; i < sizeof(launchedPath)/2 - 1 && argv[0][i] != 0; i++) //Copy and convert the path to UTF-16
|
||||
launchedPath[i] = argv[0][i];
|
||||
launchedPath[i] = 0;
|
||||
}
|
||||
@ -76,7 +76,7 @@ void main(int argc, char **argv, u32 magicWord)
|
||||
|
||||
u32 i;
|
||||
u16 *p = (u16 *)argv[0];
|
||||
for(i = 0; i < 40 && p[i] != 0; i++)
|
||||
for(i = 0; i < sizeof(launchedPath)/2 - 1 && p[i] != 0; i++)
|
||||
launchedPath[i] = p[i];
|
||||
launchedPath[i] = 0;
|
||||
}
|
||||
|
@ -302,7 +302,7 @@ u32 patchFirmlaunches(u8 *pos, u32 size, u32 process9MemAddr)
|
||||
static const u8 pattern[] = {0xE2, 0x20, 0x20, 0x90};
|
||||
|
||||
u32 pathLen;
|
||||
for(pathLen = 0; pathLen < 41 && launchedPath[pathLen] != 0; pathLen++);
|
||||
for(pathLen = 0; pathLen < sizeof(launchedPath)/2 && launchedPath[pathLen] != 0; pathLen++);
|
||||
|
||||
if(launchedPath[pathLen] != 0) return 1;
|
||||
|
||||
|
@ -129,4 +129,4 @@ extern bool isSdMode;
|
||||
extern BootType bootType;
|
||||
|
||||
extern u16 launchedFirmTidLow[8];
|
||||
extern u16 launchedPath[41];
|
||||
extern u16 launchedPath[80+1];
|
||||
|
Reference in New Issue
Block a user