summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/SMAPI/Framework/Serialization/RectangleConverter.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/Serialization/RectangleConverter.cs b/src/SMAPI/Framework/Serialization/RectangleConverter.cs
index a5780d8a..8f7318b3 100644
--- a/src/SMAPI/Framework/Serialization/RectangleConverter.cs
+++ b/src/SMAPI/Framework/Serialization/RectangleConverter.cs
@@ -37,7 +37,7 @@ namespace StardewModdingAPI.Framework.Serialization
if (string.IsNullOrWhiteSpace(str))
return Rectangle.Empty;
- var match = Regex.Match(str, @"^\{X:(?<x>\d+) Y:(?<y>\d+) Width:(?<width>\d+) Height:(?<height>\d+)\}$", RegexOptions.IgnoreCase);
+ var match = Regex.Match(str, @"^\{X:(?<x>-?\d+) Y:(?<y>-?\d+) Width:(?<width>-?\d+) Height:(?<height>-?\d+)\}$", RegexOptions.IgnoreCase);
if (!match.Success)
throw new SParseException($"Can't parse {nameof(Rectangle)} from invalid value '{str}' (path: {path}).");