From 9c30a8423dea749f8959ec03def4a8396c430b91 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 1 Feb 2020 01:26:45 +1300 Subject: Use a manual check in lieu of an assert --- crypt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crypt.c b/crypt.c index 8572199..c30672f 100644 --- a/crypt.c +++ b/crypt.c @@ -53,7 +53,9 @@ int main(int argc, char **argv) if ((printed = printf("%s\n", hash)) < 0) { error(strerror(errno)); } - assert(printed == strlen(hash) + 1); + if (printed != strlen(hash) + 1) { /* +1 for newline */ + error("Incomplete print"); + } exit(EXIT_SUCCESS); } -- cgit v1.2.3