From d8e05b0fcab24d8ba9ef5d1e4aa80964fcd7ffc8 Mon Sep 17 00:00:00 2001 From: Bruno Raoult Date: Tue, 6 Dec 2022 15:45:00 +0100 Subject: [PATCH] 2020/day2: fix for 32 bits arch --- 2020/day03/ex2-c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2020/day03/ex2-c.c b/2020/day03/ex2-c.c index e9a4658..04e8405 100644 --- a/2020/day03/ex2-c.c +++ b/2020/day03/ex2-c.c @@ -32,7 +32,7 @@ int main(ac, av) char **av; { int line=1, linelen=0, mod=0, i; - unsigned long res=1; + unsigned long long res=1; char str[80]; scanf("%s", str); /* ignore 1st line */ @@ -51,6 +51,6 @@ int main(ac, av) } for (i=0; set[i].dx != -1; ++i) res*=set[i].count; - printf ("%s : lines=%d res=%lu\n", *av, line, res); + printf ("%s : lines=%d res=%llu\n", *av, line, res); exit (0); }