mirror of
https://github.com/NikitaIvanovV/ctpv.git
synced 2025-06-21 18:31:31 +02:00
Fix: breaks if several previews with the same name
This commit is contained in:
parent
39311ccb0c
commit
bd5dd31aed
@ -74,7 +74,7 @@ static int remove_preview(char *name)
|
|||||||
{
|
{
|
||||||
int found = 0;
|
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)
|
if (strcmp(previews->buf[i].name, name) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user