mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-17 14:24:27 +01:00
fix bound checks for paragraphs array.
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 == "" && len(paragraphs) > i && isMediaURL(paragraphs[i+1]) {
|
||||
if paragraph == "" && len(paragraphs) > i+1 && isMediaURL(paragraphs[i+1]) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user