From: DeaDDooMER Date: Wed, 11 Mar 2020 21:30:03 +0000 (+0300) Subject: fix segfault on 64bit systems X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=d4b977521ea85ba1d4a7e876aa73d072945c287d;p=flatwaifu.git fix segfault on 64bit systems --- diff --git a/src/miscc.c b/src/miscc.c index b705817..3479689 100644 --- a/src/miscc.c +++ b/src/miscc.c @@ -597,7 +597,7 @@ int Z_moveobj(obj_t *p) { void Z_splash(obj_t *p,int n) { Z_sound(bulsnd[0],128); DOT_water(p->x,p->y-p->h/2,p->xv+p->vx,p->yv+p->vy,n, - (int)walp[wfront]-1); + (intptr_t)walp[wfront]-1); } void Z_calc_time(dword t,word *h,word *m,word *s) @@ -652,4 +652,4 @@ int32_t int2host (int32_t x) { #else return x; #endif -} \ No newline at end of file +} diff --git a/src/vga.c b/src/vga.c index f2e5b44..3b4e065 100644 --- a/src/vga.c +++ b/src/vga.c @@ -321,31 +321,26 @@ void V_remap_rect(int x,int y,int w,int h,byte *cmap) extern void *walp[256]; extern byte clrmap[256*12]; -void Z_drawfld(byte *fld, int bg) +void Z_drawfld (byte *fld, int bg) { byte *p = fld; - int x,y; - for (y=0; y