Skip to content

Commit fa567ba

Browse files
committed
Merge pull request #59 from manisandro/master
Fix issue #52
2 parents d58006a + 416d5f7 commit fa567ba

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libImaging/Quant.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,13 @@ pixel_cmp(const HashTable h,const void *a,const void *b)
135135
static void
136136
exists_count_func(const HashTable h, const void *key, void **val)
137137
{
138-
(*(int *)val)+=1;
138+
*(unsigned long*)val+=1;
139139
}
140140

141141
static void
142142
new_count_func(const HashTable h, const void *key, void **val)
143143
{
144-
(*(int *)val)=1;
144+
*(unsigned long*)val=1;
145145
}
146146

147147
static void
@@ -151,7 +151,7 @@ rehash_collide(HashTable h,
151151
void *newkey,
152152
void *newval)
153153
{
154-
*valp = (void *)(((int) *valp) + ((int) newval));
154+
*valp = (void *)(((unsigned long) *valp) + ((unsigned long) newval));
155155
}
156156

157157
/* %% */
@@ -244,7 +244,7 @@ hash_to_list(HashTable h, const void *key, const void *val, void *u)
244244
Pixel *pixel=(Pixel *)&key;
245245
int i;
246246
Pixel q;
247-
int count=(int) val;
247+
int count=(unsigned long) val;
248248

249249
PIXEL_SCALE(pixel,&q,d->scale);
250250

0 commit comments

Comments
 (0)