diff options
| author | lost+skunk <[email protected]> | 2024-08-14 19:18:40 +0300 |
|---|---|---|
| committer | lost+skunk <[email protected]> | 2024-08-14 19:18:40 +0300 |
| commit | 4487cdcbe9ed2ad4bc661c04600336505054177c (patch) | |
| tree | 1bfba9d5bf27bb4b4a96d6c8a010c06eecbd0b4e /deviantion.go | |
| parent | 42ea2980f9be365c97b17d5273270fa1862ee9fc (diff) | |
| download | devianter-4487cdcbe9ed2ad4bc661c04600336505054177c.tar.gz devianter-4487cdcbe9ed2ad4bc661c04600336505054177c.tar.bz2 devianter-4487cdcbe9ed2ad4bc661c04600336505054177c.zip | |
user favs
Diffstat (limited to 'deviantion.go')
| -rw-r--r-- | deviantion.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/deviantion.go b/deviantion.go index f2a85e6..c7640e8 100644 --- a/deviantion.go +++ b/deviantion.go @@ -104,7 +104,7 @@ func UrlFromMedia(m Media, thumb ...int) string { for _, t := range m.Types { if t.T == "fullview" { url.WriteString(m.BaseUri) - if m.BaseUri[len(m.BaseUri)-3:] != "gif" && t.W*t.H < 33177600 { + if l := len(m.BaseUri); l != 0 && (m.BaseUri[l-3:] != "gif" && t.W*t.H < 33177600) { if len(thumb) != 0 { subtractWidthHeight(thumb[0], &t.W, &t.H) } |
