example.c: use `atoi` instead of `atol` to parse into `int`

This commit is contained in:
Intel A80486DX2-66 2024-04-21 18:06:38 +03:00
parent c63a09fabe
commit 283ed3f851
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ int main(int argc, char **argv) {
ARGH_NEXT();
if ARGH_BOOL("-p", "--prefix") { prefix = true;}
else if ARGH_BOOL("-l", "--lz4") { lz4 = true; }
else if ARGH_FLAG("-h", "--head") { head = atol(ARGH_VAL()); }
else if ARGH_FLAG("-h", "--head") { head = atoi(ARGH_VAL()); }
}
printf("head: %d, prefix: %d, lz4: %d\n", head, prefix, lz4);
for (int i = 0; i < ARGH_ARGC; i++)