Skip to content

Commit

Permalink
Fix for certain param.sfo getting parsed wrongly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinnegatamante committed Mar 18, 2020
1 parent 551cad8 commit 60401c5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source/luaSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,6 @@ static int lua_extractsfo(lua_State *L) {
uint8_t* key_table = (uint8_t*)malloc(hdr.dataTableOffset - hdr.keyTableOffset);
fread(key_table, hdr.dataTableOffset - hdr.keyTableOffset, 1, f);
lua_newtable(L);
lua_newtable(L);
uint8_t return_indexes = 0;
for (int i=0; i < hdr.indexTableEntries; i++){
char param_name[256];
Expand All @@ -830,10 +829,10 @@ static int lua_extractsfo(lua_State *L) {
lua_pushstring(L, ver);
lua_settable(L, -3);
return_indexes++;
}else if (strcmp(param_name, "TITLE") == 0){ // Application Title
}else if (strcmp(param_name, "STITLE") == 0){ // Application Title
lua_pushstring(L, "title");
char title[0x80];
fread(title, entry_table[i].paramLen, 1, f);
fread(title, entry_table[i].paramLen > 1 ? entry_table[i].paramLen : (entry_table[i+1].dataOffset - entry_table[i].dataOffset), 1, f);
lua_pushstring(L, title);
lua_settable(L, -3);
return_indexes++;
Expand Down

0 comments on commit 60401c5

Please sign in to comment.