diff --git a/exa/exa.c b/exa/exa.c index 75d5c0d..d5b7615 100644 --- a/exa/exa.c +++ b/exa/exa.c @@ -158,7 +158,7 @@ exaLog2(int val) { int bits; - if (!val) + if (val <= 0) return 0; for (bits = 0; val != 0; bits++) val >>= 1;