mirror of
https://github.com/3DSGuy/Project_CTR.git
synced 2025-06-19 05:55:31 -04:00
[ctrtool] fix bug with seeddb
This commit is contained in:
parent
b0896ecee2
commit
d185b18f27
1
.gitignore
vendored
1
.gitignore
vendored
@ -228,3 +228,4 @@ pip-log.txt
|
|||||||
#exec
|
#exec
|
||||||
*.exe
|
*.exe
|
||||||
*.db
|
*.db
|
||||||
|
/.vs/slnx.sqlite
|
||||||
|
3
.vs/ProjectSettings.json
Normal file
3
.vs/ProjectSettings.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"CurrentProjectSetting": null
|
||||||
|
}
|
9
.vs/VSWorkspaceState.json
Normal file
9
.vs/VSWorkspaceState.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"ExpandedNodes": [
|
||||||
|
"",
|
||||||
|
"\\ctrtool",
|
||||||
|
"\\makerom"
|
||||||
|
],
|
||||||
|
"SelectedNode": "\\makerom\\keyset.c",
|
||||||
|
"PreviewInSolutionExplorer": false
|
||||||
|
}
|
BIN
ctrtool/ctrtool
Normal file
BIN
ctrtool/ctrtool
Normal file
Binary file not shown.
@ -301,7 +301,7 @@ void keyset_parse_seeddb(keyset* keys, char* path)
|
|||||||
seeddb_header hdr;
|
seeddb_header hdr;
|
||||||
fread(&hdr, sizeof(seeddb_header), 1, fp);
|
fread(&hdr, sizeof(seeddb_header), 1, fp);
|
||||||
|
|
||||||
u32 n_entries = getle32(hdr.n_entries);
|
keys->seed_num = getle32(hdr.n_entries);
|
||||||
for (u32 i = 0; i < 0xC; i++)
|
for (u32 i = 0; i < 0xC; i++)
|
||||||
{
|
{
|
||||||
if (hdr.padding[i] != 0x00)
|
if (hdr.padding[i] != 0x00)
|
||||||
@ -311,8 +311,8 @@ void keyset_parse_seeddb(keyset* keys, char* path)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
keys->seed_db = (seeddb_entry*)calloc(n_entries, sizeof(seeddb_entry));
|
keys->seed_db = (seeddb_entry*)calloc(keys->seed_num, sizeof(seeddb_entry));
|
||||||
fread(keys->seed_db, n_entries * sizeof(seeddb_entry), 1, fp);
|
fread(keys->seed_db, keys->seed_num * sizeof(seeddb_entry), 1, fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void keyset_dump_rsakey(rsakey2048* key, const char* keytitle)
|
void keyset_dump_rsakey(rsakey2048* key, const char* keytitle)
|
||||||
|
BIN
ctrtool/seeddb.bin
Normal file
BIN
ctrtool/seeddb.bin
Normal file
Binary file not shown.
BIN
makerom/makerom
Normal file
BIN
makerom/makerom
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user