Fix NRE with offsets

This commit is contained in:
Matt Nadareski
2022-10-20 13:03:07 -07:00
parent 8b29ac7e47
commit 022e87c4bb
2 changed files with 2 additions and 1 deletions

View File

@@ -168,6 +168,7 @@
- Add logging to !submissionInfo writing failure
- Add logging to !submissionInfo formatting failure
- Update issue templates to be more accurate
- Fix NRE with offsets
### 2.3 (2022-02-05)
- Start overhauling Redump information pulling, again

View File

@@ -820,7 +820,7 @@ namespace MPF.Library
AddIfExists(output, Template.DATField, info.TracksAndWriteOffsets.ClrMameProData + "\n", 1);
AddIfExists(output, Template.CuesheetField, info.TracksAndWriteOffsets.Cuesheet, 1);
string offset = info.TracksAndWriteOffsets.OtherWriteOffsets;
if (!offset.StartsWith("-"))
if (offset?.StartsWith("-") == false)
offset = $"+{offset}";
AddIfExists(output, Template.WriteOffsetField, offset, 1);