Update src/invidious/videos/description.cr

Co-authored-by: Fijxu <fijxu@nadeko.net>
This commit is contained in:
shiny-comic 2026-02-17 13:42:08 +09:00 committed by GitHub
parent 51aab0681b
commit 698cd49529
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -86,7 +86,8 @@ def parse_description(desc, video_id : String) : String?
end
# Copy the end of the string (past the last command).
remaining_length = utf16_length(content) - index
content_size = content.ascii_only? ? content.size : utf16_length(content)
remaining_length = content_size - index
copy_string(str, iter, remaining_length) if remaining_length > 0
end
end