summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-xbm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdk-pixbuf/io-xbm.c')
-rw-r--r--gdk-pixbuf/io-xbm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdk-pixbuf/io-xbm.c b/gdk-pixbuf/io-xbm.c
index 83de5c6da..5bf71e1bf 100644
--- a/gdk-pixbuf/io-xbm.c
+++ b/gdk-pixbuf/io-xbm.c
@@ -133,8 +133,8 @@ next_int (FILE *fstream)
/* trim high bits, check type and accumulate */
ch &= 0xff;
if (g_ascii_isxdigit (ch)) {
- value = (value << 4) + g_ascii_xdigit_value (ch);
- gotone++;
+ value = ((value & 0xf) << 4) + g_ascii_xdigit_value (ch);
+ gotone = 1;
} else if ((hex_table[ch]) < 0 && gotone) {
done++;
}