commit 20cefd4e701fa693380f9f55fb693b55594c0353
parent 4923a9e0ec552eaf668da550c10942a83a027442
Author: Remy Noulin <loader2x@gmail.com>
Date: Wed, 11 Jun 2025 20:46:52 +0200
fix issue in showMyHistory
The printf format uses %d so the count u64 needs to be cast to u32.
(it segfaulted on 32bit machines)
dotfiles/showMyHistory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dotfiles/showMyHistory.c b/dotfiles/showMyHistory.c
@@ -57,7 +57,7 @@ int main(int ARGC, char** ARGV) {
printf("%*d "RED"%3d"RST" %s "YLW"%*s"RST" "RED"%s"RST"\n", countLen, count, exitCode, /*date*/getG(a, rtChar, 2), max, path, /*cmd*/getG(a, rtChar, 3));
}
else {
- printf("%*d "GRN"%3d"RST" %s "YLW"%*s"RST" %s\n", countLen, count, exitCode, /*date*/getG(a, rtChar, 2), max, path, /*cmd*/getG(a, rtChar, 3));
+ printf("%*d "GRN"%3d"RST" %s "YLW"%*s"RST" %s\n", countLen, (u32)count, exitCode, /*date*/getG(a, rtChar, 2), max, path, /*cmd*/getG(a, rtChar, 3));
}
e += len;
} while(e < buf + hlen);