diff options
Diffstat (limited to 'nx-X11/programs/Xserver/dix/ffs.c')
-rw-r--r-- | nx-X11/programs/Xserver/dix/ffs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/dix/ffs.c b/nx-X11/programs/Xserver/dix/ffs.c index e25d715dd..80fbcc8a9 100644 --- a/nx-X11/programs/Xserver/dix/ffs.c +++ b/nx-X11/programs/Xserver/dix/ffs.c @@ -30,6 +30,8 @@ int ffs(int i) { int j; + if (i == 0) + return 0; for (j = 1; (i & 1) == 0; j++) i >>= 1; return j; |