Fix: breaks if several previews with the same name

This commit is contained in:
Nikita Ivanov 2022-06-12 22:29:07 +05:00
parent 39311ccb0c
commit bd5dd31aed
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133

View File

@ -74,7 +74,7 @@ static int remove_preview(char *name)
{
int found = 0;
for (size_t i = 0; i < previews->len; i++) {
for (ssize_t i = previews->len - 1; i >= 0; i--) {
if (strcmp(previews->buf[i].name, name) != 0)
continue;