summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2021-03-11 18:26:48 -0500
committerThomas E. Dickey <dickey@invisible-island.net>2021-03-11 20:25:34 -0500
commit362fdcfc3ed7fd0841c48c2a7b6f3fc3af5d5cdb (patch)
tree9fc2d10b79ff2d378579ed7b779fc3b3de169389 /src
parent09f69a8829fea8939afda32fe4f25f1eda57085d (diff)
add check in case the image size is 0x0
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'src')
-rw-r--r--src/cursor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cursor.c b/src/cursor.c
index c248eec..490ca20 100644
--- a/src/cursor.c
+++ b/src/cursor.c
@@ -428,7 +428,7 @@ _XcursorFloydSteinberg (const XcursorImage *image, XcursorCoreCursor *core)
n = (int) npixels;
max_inten = 0;
min_inten = 0xff;
- while (n--)
+ while (n-- >= 0)
{
p = *pixel++;
*aP++ = (int) (p >> 24);