ref: fe1e95d6d80a1d5185198072d794457e7c94c511
parent: 6176b557596bcca7469224ded3f2384d3a2773db
author: aiju <aiju@phicode.de>
date: Sat Feb 11 19:38:17 EST 2017
games/gb: timer array should be unsigned (thanks qwx)
--- a/sys/src/games/gb/gb.c
+++ b/sys/src/games/gb/gb.c
@@ -40,7 +40,7 @@
}
void
-timerload(char *buf)
+timerload(uchar *buf)
{
timer.ns = buf[0] | buf[1] << 8 | buf[2] << 16 | buf[3] << 24 | (uvlong)buf[4] << 32 | (uvlong)buf[5] << 40 | (uvlong)buf[6] << 48LL | (uvlong)buf[7] << 56LL;
timer.sec = buf[8];
@@ -56,7 +56,7 @@
}
void
-timersave(char *buf)
+timersave(uchar *buf)
{
buf[0] = timer.ns;
buf[1] = timer.ns >> 8;
@@ -81,7 +81,7 @@
void
flushback(void)
{
- char buf[TIMERSIZ];
+ uchar buf[TIMERSIZ];
if(savefd >= 0){
pwrite(savefd, back, nback, 0);
@@ -95,7 +95,7 @@
loadsave(char *file)
{
char *buf, *p;
- char tim[TIMERSIZ];
+ uchar tim[TIMERSIZ];
buf = emalloc(strlen(file) + 4);
strcpy(buf, file);