diff --git a/src/invidious/videos/description.cr b/src/invidious/videos/description.cr index 9f36477c..d448ba80 100644 --- a/src/invidious/videos/description.cr +++ b/src/invidious/videos/description.cr @@ -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