Commit ed0ea96ed9ab19c0757a7b81619ace39e71a22c5

Edward Thomson 2021-08-30T09:02:26

date: promote before multiply

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/date.c b/src/date.c
index 71bf631..2297ee6 100644
--- a/src/date.c
+++ b/src/date.c
@@ -722,7 +722,7 @@ static const char *approxidate_alpha(const char *date, struct tm *tm, struct tm 
 	while (tl->type) {
 		size_t len = strlen(tl->type);
 		if (match_string(date, tl->type) >= len-1) {
-			update_tm(tm, now, tl->length * *num);
+			update_tm(tm, now, tl->length * (unsigned long)*num);
 			*num = 0;
 			*touched = 1;
 			return end;