diff options
author | Bert <ber.t@gmx.com> | 2011-09-06 11:55:31 +0200 |
---|---|---|
committer | Bert <ber.t@gmx.com> | 2011-09-06 11:55:31 +0200 |
commit | 8f34b7e95cc4de30b67eacb264688ca14acaaf60 (patch) | |
tree | d788d533dc9ac3044904d1f7ad9cb8d666ff66d1 /main.c | |
parent | 14d1daf280f6912b33a57e802cc12a9ee96a3e4f (diff) | |
download | nsxiv-8f34b7e95cc4de30b67eacb264688ca14acaaf60.tar.zst |
Load as much of a corrupted gif file as possible
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -99,6 +99,7 @@ void check_add_file(char *filename) { return; } } + files[fileidx].loaded = 0; files[fileidx].name = s_strdup(filename); if (*filename == '/') files[fileidx].path = files[fileidx].name; @@ -198,18 +199,17 @@ void load_image(int new) { new = filecnt - 1; } + files[new].loaded = 1; fileidx = new; if (!stat(files[new].path, &fstats)) filesize = fstats.st_size; else filesize = 0; - if (img.multi.cnt) { - if (img.multi.animate) - set_timeout(animate, img.multi.frames[img.multi.sel].delay, 1); - else - reset_timeout(animate); - } + if (img.multi.cnt && img.multi.animate) + set_timeout(animate, img.multi.frames[img.multi.sel].delay, 1); + else + reset_timeout(animate); } void update_title() { |