Commit Diff


commit - 0e52c796bdd86faddecf7bb4bba64644056d75c3
commit + db56dbf36b30921ab03d512f00388b331bd5da35
blob - 486d5303297b8c51b2770a345aea93d952e67e1b
blob + 9af012eaa56ab636c90685e1272977ca769c58f5
--- src/cmd/scat/display.c
+++ src/cmd/scat/display.c
@@ -38,7 +38,7 @@ displaypic(Picture *pic)
 		/* release the memory as we hand it off; this could be a big piece of data */
 		a = pic->data;
 		while(n > 0){
-			i = 8192 - (((int)a)&8191);
+			i = 8192 - (((uintptr)a)&8191);
 			if(i > n)
 				i = n;
 			if(write(p[1], a, i)!=i)