Fix crash when cancelling mod download
All checks were successful
Build / Compute Version (push) Successful in 5s
Build / Build Nuget package (push) Successful in 54s

This commit is contained in:
2025-05-16 21:36:52 -04:00
parent 28b82c7c96
commit 67b3c08fbb
2 changed files with 5 additions and 2 deletions

View File

@@ -273,7 +273,7 @@ public class ModListComponent : IRenderComponent
var description = details.m_rgchDescription;
list.Add(new(details.m_nPublishedFileId.m_PublishedFileId, title,
string.IsNullOrEmpty(item.Tooltip)
? description[..Math.Min(description.Length - 1, 255)]
? description[..Math.Min(description.Length, 255)]
: item.Tooltip,
item.Description,
description, $"https://steamcommunity.com/sharedfiles/filedetails/?id={details.m_nPublishedFileId.m_PublishedFileId}",