Skip to content

Commit

Permalink
feat(validate): don't attempt validation when ROM has no serial
Browse files Browse the repository at this point in the history
Homebrew ROMs and software tend not to have serials (e.g. 'NSME'). A serial is required to look-up a ROM in the datfile.
  • Loading branch information
mroach committed Mar 16, 2022
1 parent d3606b8 commit 885faa9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ func init() {
if err != nil {
return err
}

if romfile.Serial() == "" {
return fmt.Errorf("ROM has no serial number which is required to look it up in the DAT file.")
}

if err = romfile.AddSHA1(); err != nil {
return err
}
Expand Down

0 comments on commit 885faa9

Please sign in to comment.