From 39986b29f34795d346b8feb10ce4fe9caac8878e Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Tue, 13 Oct 2020 00:04:14 +0200 Subject: blogc: fix post sorting when mixing posts before and after `Sun Sep 9 01:46:40 AM UTC 2001` --- src/blogc/loader.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/blogc/loader.c b/src/blogc/loader.c index 4e03ec3..af30a1b 100644 --- a/src/blogc/loader.c +++ b/src/blogc/loader.c @@ -121,7 +121,10 @@ sort_source(const void *a, const void *b) return 0; // wat } - return strcmp(cb, ca); + unsigned long la = strtoul(ca, NULL, 10); + unsigned long lb = strtoul(cb, NULL, 10); + + return (int) (lb - la); } -- cgit v1.2.3-18-g5258