--- bogl-0.1.18.orig/bogl-cfb.c
+++ bogl-0.1.18/bogl-cfb.c
@@ -55,7 +55,7 @@
   /* For anything else, assert that we are actually aligned on a pixel
      boundary, otherwise we are sure to lose */
   dst = (unsigned char*) d + offset * b / 8;
-  assert((((unsigned int)dst * 8) % b) == 0);
+  assert((((unsigned long)dst * 8) % b) == 0);
 
   /* Sanity... */
   assert (b <= 32);
@@ -79,7 +79,7 @@
 
 /*    printf ("Filling %d pixels == %d bytes\n\r", len, len * b / 8); */
       /* Align to an int boundary */
-      while ((unsigned int)dst % sizeof(unsigned int))
+      while ((unsigned long)dst % sizeof(unsigned int))
 	{
 /*        printf ("Aligning %d bytes\n\r", (unsigned int)dst % sizeof(unsigned int)); */
 	  if (b >= 8)
