From 2d90a63ca77c24c93aa349b1caf6e0605bdc79a2 Mon Sep 17 00:00:00 2001 From: fuzzball Date: Wed, 26 Oct 2022 13:07:51 +0900 Subject: [PATCH] Add + to positive offsets in a better way (#422) --- MPF.Library/InfoTool.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MPF.Library/InfoTool.cs b/MPF.Library/InfoTool.cs index 1a9e4891..accf5d83 100644 --- a/MPF.Library/InfoTool.cs +++ b/MPF.Library/InfoTool.cs @@ -821,8 +821,8 @@ 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("-") == false) - offset = $"+{offset}"; + if (Int32.TryParse(offset, out int i)) + offset = i.ToString("+#;-#;0"); AddIfExists(output, Template.WriteOffsetField, offset, 1); }