mirror of
https://github.com/aljazceru/njump.git
synced 2026-01-31 19:54:29 +01:00
fix for index out of range when checking if next paragraph is media.
This commit is contained in:
@@ -209,7 +209,7 @@ func drawParagraphs(paragraphs []string, fontSize int, width, height int) (image
|
||||
paragraph := paragraphs[i]
|
||||
|
||||
// Skip empty lines if the next element is an image
|
||||
if paragraph == "" && isMediaURL(paragraphs[i+1]) {
|
||||
if paragraph == "" && len(paragraphs) > i && isMediaURL(paragraphs[i+1]) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user