Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions source/modpackdownload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ void modpackDownload()

//Read out info about the modpack
ifstream tidfile("/3ds/ModMoon/temp/titleid.txt");
char titleid[128];
tidfile.read(titleid, 128);
char titleid[16]={0};
tidfile.read(titleid, 16);
u64 tid = strtoull(titleid, NULL, 16);

tidfile.close();
Expand All @@ -130,11 +130,11 @@ void modpackDownload()
}

int newslot = maxslotcheck(tid, 1000) + 1;
string dest = "/3ds/ModMoon/" + string(titleid) + "/Slot_" + to_string(newslot);
string dest = "/3ds/ModMoon/" + string(titleid).substr(0,16) + "/Slot_" + to_string(newslot);
chdir("/");
remove("/3ds/ModMoon/temp.zip");
rename("/3ds/ModMoon/temp", dest.c_str());
//If the game in question is the current title, we need it to recognize there's a new slot.
maxslot = maxslotcheck();
error("Finished installing modpack!\nModpack name:\n" + name);
}
}