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:
mid-kid
2026-09-18 16:28:12 +02:00
committed by GitHub
parent 67a453fff0
commit 38c659f83a
+1 -1
View File
@@ -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)