summaryrefslogtreecommitdiff
path: root/exa
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2006-06-24 15:21:17 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2006-06-24 15:21:17 +0200
commit930b9a069a425818d4e9965f53be7df1f4d7d422 (patch)
tree961677f7acdbeb38aab4382f980780e5c2bec094 /exa
parent36756fdb2ddc154b406f664a6af0f38d26e6973d (diff)
Bug #6818: Avoid infinite loop in exaLog2() with negative arguments.
Diffstat (limited to 'exa')
-rw-r--r--exa/exa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/exa/exa.c b/exa/exa.c
index 4b96af815..aa5532a98 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;