1
0
mirror of git://git.suckless.org/sbase synced 2024-12-21 22:50:16 +00:00

tar: chktar: fix conditional typo

This commit is contained in:
Elie Le Vaillant 2024-03-05 21:20:57 +01:00 committed by Roberto E. Vargas Caballero
parent bca3fcca91
commit 13898fa7a9

2
tar.c
View File

@ -423,7 +423,7 @@ chktar(struct header *h)
goto bad;
}
memcpy(tmp, h->chksum, sizeof(tmp));
for (i = 0; i < sizeof(tmp), tmp[i] == ' '; i++);
for (i = 0; i < sizeof(tmp) && tmp[i] == ' '; i++);
for (; i < sizeof(tmp); i++)
if (tmp[i] == ' ')
tmp[i] = '\0';