mirror of
https://github.com/LNH-team/pico-loader.git
synced 2026-11-07 13:40:42 +01:00
Don't append arguments to arm9i unless running on DSi (#223)
This would write into the RAM mirror of DSi-enhanced homeberew on DSLite and older models, possibly overwriting parts of the binary. In particular, GodMode9i was affected, with v3.9.0 encountering fatal crashes on boot.
This commit is contained in:
@@ -432,7 +432,7 @@ void NdsLoader::InsertArgv()
|
||||
|
||||
// Find the address to write argv
|
||||
u32 argDst = ((_romHeader.arm9LoadAddress + _romHeader.arm9Size + 3) & ~3) + 4;
|
||||
if (_romHeader.SupportsDsiMode())
|
||||
if (_runInDSiMode)
|
||||
{
|
||||
u32 argDstTwl = ((_romHeader.arm9iLoadAddress + _romHeader.arm9iSize + 3) & ~3) + 4;
|
||||
if (argDstTwl > argDst)
|
||||
|
||||
Reference in New Issue
Block a user