shithub: riscv

Download patch

ref: 9a5234031355acf4c6fec449f56136ad1300d71a
parent: d77455ab2ddfbb74917f98a3344c47403b0461e8
author: cinap_lenrek <[email protected]>
date: Sat Feb 1 04:54:09 EST 2014

libmemdraw: apply erik quanstros fix for sign preserving in byteaddr()

--- a/sys/src/libmemdraw/alloc.c
+++ b/sys/src/libmemdraw/alloc.c
@@ -143,8 +143,7 @@
 {
 	uchar *a;
 
-	a = i->data->bdata+i->zero+sizeof(ulong)*p.y*i->width;
-
+	a = i->data->bdata+i->zero+(int)(sizeof(ulong)*p.y*i->width);
 	if(i->depth < 8){
 		/*
 		 * We need to always round down,