ICO loader: Enable specifying ico image index by key

This commit is contained in:
Kim Woelders 2021-04-10 06:14:59 +02:00
parent 7eb6c6388b
commit 1f6438a1c7
1 changed files with 6 additions and 7 deletions

View File

@ -308,13 +308,12 @@ ico_load(ico_t * ico, ImlibImage * im, int load_data)
}
/* Enable overriding selected index for debug purposes */
{
const char *s = getenv("IMLIB2_LOADER_ICO");
ic = (s) ? atoi(s) : ic;
if (ic >= ico->idir.icons)
return 0;
}
if (im->key)
{
ic = atoi(im->key);
if (ic >= ico->idir.icons)
return 0;
}
ie = &ico->ie[ic];