Fix wrong Length usage in HandLabeler (#18718)

This commit is contained in:
Vordenburg
2023-08-05 16:50:57 -04:00
committed by GitHub
parent cb11a276dd
commit 99a27f3018

View File

@@ -93,7 +93,8 @@ namespace Content.Server.Labels
if (args.Session.AttachedEntity is not {Valid: true} player) if (args.Session.AttachedEntity is not {Valid: true} player)
return; return;
handLabeler.AssignedLabel = args.Label.Trim().Substring(0, Math.Min(handLabeler.MaxLabelChars, args.Label.Length)); var label = args.Label.Trim();
handLabeler.AssignedLabel = label.Substring(0, Math.Min(handLabeler.MaxLabelChars, label.Length));
DirtyUI(uid, handLabeler); DirtyUI(uid, handLabeler);
// Log label change // Log label change