From 5743ce6820c0cfceab4cc71229b5b069b99a8dce Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 4 Oct 2023 22:26:00 +0200 Subject: Check for ā€˜-pā€™ never being passed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.l | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.l b/main.l index 9478c16..cae65e7 100644 --- a/main.l +++ b/main.l @@ -156,6 +156,9 @@ atou(const char *s) bool print_ordinal(void) { + if (positions.ps == NULL) + return true; + /* Basic binary search */ for (size_t l = 0, r = positions.len - 1, m; l <= r;) { m = l + (r - l) / 2; -- cgit v1.2.3