Merge pull request #2892 from hufang360/patch-1

Update Utils.cs
This commit is contained in:
Chris 2023-03-26 15:36:20 +10:30 committed by GitHub
commit 2c06e2bdf5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -330,7 +330,7 @@ namespace TShockAPI
/// <returns>The item represented by the tag.</returns>
public Item GetItemFromTag(string tag)
{
Regex regex = new Regex(@"\[i(tem)?(?:\/s(?<Stack>\d{1,3}))?(?:\/p(?<Prefix>\d{1,3}))?:(?<NetID>-?\d{1,4})\]");
Regex regex = new Regex(@"\[i(tem)?(?:\/s(?<Stack>\d{1,4}))?(?:\/p(?<Prefix>\d{1,3}))?:(?<NetID>-?\d{1,4})\]");
Match match = regex.Match(tag);
if (!match.Success)
return null;