Fix an issue that causes client crash after receiving long text

This commit is contained in:
ZIT WANG 2017-04-25 20:01:24 +08:00
parent a026c5809f
commit 58e2b85f59

View file

@ -869,8 +869,13 @@ namespace TShockAPI
/// <param name="matches">An enumerable list with the matches</param>
public void SendMultipleMatchError(TSPlayer ply, IEnumerable<object> matches)
{
ply.SendErrorMessage("More than one match found: {0}", string.Join(",", matches));
ply.SendErrorMessage("Use \"my query\" for items with spaces");
ply.SendErrorMessage("More than one match found: ");
var lines = PaginationTools.BuildLinesFromTerms(matches.ToArray());
lines.ForEach(ply.SendInfoMessage);
ply.SendErrorMessage("Use \"my query\" for items with spaces.");
}
/// <summary>