summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Serialization/RectangleConverter.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-10-03 20:49:03 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-10-03 20:49:03 -0400
commitc87cd3b0028de6e9b4ed0eaacbc73cb83d64cd46 (patch)
tree7c130a6a2b137ec08297ce7a13ebd8142323320c /src/SMAPI/Framework/Serialization/RectangleConverter.cs
parentde84adb47751c96fc60be66f6fdb186a09160820 (diff)
parent68e9733a856b41c2b74d5c35a4b812e68157fbca (diff)
downloadSMAPI-c87cd3b0028de6e9b4ed0eaacbc73cb83d64cd46.tar.gz
SMAPI-c87cd3b0028de6e9b4ed0eaacbc73cb83d64cd46.tar.bz2
SMAPI-c87cd3b0028de6e9b4ed0eaacbc73cb83d64cd46.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Framework/Serialization/RectangleConverter.cs')
-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}).");