From ee7c5070e88d58f915fe6fe3a2f2c8af124b0565 Mon Sep 17 00:00:00 2001 From: caleb Date: Thu, 14 Aug 2025 14:29:34 -0400 Subject: [PATCH] allow minus sign in OffsetString --- src/LiveSplit.Video/VideoSettings.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/LiveSplit.Video/VideoSettings.cs b/src/LiveSplit.Video/VideoSettings.cs index 59dbe93..64d6b64 100644 --- a/src/LiveSplit.Video/VideoSettings.cs +++ b/src/LiveSplit.Video/VideoSettings.cs @@ -28,7 +28,9 @@ public string OffsetString get => TimeFormatter.Format(Offset); set { - if (Regex.IsMatch(value, "[^0-9:.,-]")) + // The ordering here is significant. If the DASH isn't last the expression attempts to match on a range. + string negative_pattern = "[^0-9:.," + TimeFormatConstants.MINUS + TimeFormatConstants.DASH + "]"; + if (Regex.IsMatch(value, negative_pattern)) { return; }