From: Trent Huber Date: Mon, 21 Jul 2025 03:47:03 +0000 (-0400) Subject: build() bug fix X-Git-Url: https://trenthuber.com/code?a=commitdiff_plain;h=abb07eb9605daad57ab693104884ce05ffea95ca;p=cbs.git build() bug fix --- diff --git a/cbs.c b/cbs.c index 40f4143..d3e7b72 100644 --- a/cbs.c +++ b/cbs.c @@ -158,7 +158,7 @@ void build(char *path) { if (stat("build.c", &src) == -1) err(EXIT_FAILURE, "Unable to stat `build.c'"); - if (stat("build.o", &obj) == -1 && src.st_mtime > obj.st_mtime) { + if (stat("build.o", &obj) == -1 || src.st_mtime > obj.st_mtime) { compile("build"); load('x', "build", (char *[]){"build", NULL}); } else if (!path) return;