shithub: riscv

Download patch

ref: 5fd52f62418ffbfcdb31c2519ee071b0d7dc1063
parent: f556fd24378aa50136a8b52344a47881eb6a69eb
author: cinap_lenrek <[email protected]>
date: Sun Feb 2 22:53:18 EST 2014

libdraw: work arround devdraw truncating screenid as 16bit

--- a/sys/src/libdraw/window.c
+++ b/sys/src/libdraw/window.c
@@ -29,7 +29,7 @@
 		a = bufimage(d, 1+4+4+4+1);
 		if(a == 0)
 			break;
-		id = ++screenid;
+		id = ++screenid & 0xfffff;	/* old devdraw bug */
 		a[0] = 'A';
 		BPLONG(a+1, id);
 		BPLONG(a+5, image->id);