Skip to content

Commit 814e4bf

Browse files
committed
fix empty cheat
1 parent 74bbad8 commit 814e4bf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cheat-parser.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@ func main() {
9898
}
9999
}
100100

101+
for game, cheats := range cheatDB {
102+
for cheat_name, cheat := range cheats {
103+
if len(cheat.Data) == 0 {
104+
delete(cheatDB[game], cheat_name)
105+
log.Printf("Removing empty cheat %s for game %s\n", cheat_name, game)
106+
}
107+
}
108+
}
109+
101110
b, err := json.Marshal(cheatDB)
102111
if err != nil {
103112
log.Panic(err)

0 commit comments

Comments
 (0)