aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Winston2024-06-18 12:06:03 -0400
committerBen Winston2024-06-18 12:06:03 -0400
commitc49964babacb88b71ad3aaa2cee2e5a69d537d60 (patch)
treed78ddd3bf53383f5717aeb72521f4b007f2a551d
parentdfa758e1dd36149a03a285e4731741da64eb1236 (diff)
bugfix: verify BOOKI_FILE variable is not empty
-rw-r--r--booki.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/booki.c b/booki.c
index 682f333..1738f9f 100644
--- a/booki.c
+++ b/booki.c
@@ -1050,7 +1050,7 @@ void help(bool err) {
/*** the main event ***/
int main(int argc, char* argv[]) {
char* booki_file = getenv("BOOKI_FILE");
- if (!booki_file) {
+ if (!booki_file || strlen(booki_file) == 0) {
printf("expecting BOOKI_FILE variable\n");
return 1;
}