We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f3385b7 commit a438230Copy full SHA for a438230
1 file changed
Assets/Hypertext/Scripts/HypertextBase.cs
@@ -181,8 +181,8 @@ void GenerateHrefBoundingBoxes(ref List<UIVertex> vertices)
181
var startIndex = visibleCharIndexMap[span.StartIndex];
182
var endIndex = visibleCharIndexMap[span.StartIndex + span.Length - 1];
183
184
- startIndex = Mathf.Clamp(startIndex, 0, visibleCharIndexMap.Last());
185
- endIndex = Mathf.Clamp(endIndex, 0, visibleCharIndexMap.Last());
+ startIndex = Mathf.Clamp(startIndex, 0, text.Length - 1);
+ endIndex = Mathf.Clamp(endIndex, 0, text.Length - 1);
186
187
for (var textIndex = startIndex; textIndex <= endIndex; textIndex++)
188
{
0 commit comments