diff --git a/src/uxn.h b/src/uxn.h index 04f4aa5..6a0dc97 100644 --- a/src/uxn.h +++ b/src/uxn.h @@ -29,7 +29,7 @@ typedef struct { } Stack; typedef struct Uxn { - Uint8 *ram, dev[0x100]; + Uint8 *ram, *dev; Stack wst, rst; } Uxn; diff --git a/src/uxnemu.c b/src/uxnemu.c index ebcb33d..d91041d 100644 --- a/src/uxnemu.c +++ b/src/uxnemu.c @@ -488,7 +488,10 @@ main(int argc, char **argv) { Uint8 *ram; char *rom; + Uint8 dev[0x100] = {0}; Uxn u = {0}, u_audio = {0}; + u.dev = (Uint8 *)&dev; + u_audio.dev = (Uint8 *)&dev; int i = 1; if(i == argc) return system_error("usage", "uxnemu [-v] | uxnemu [-f | -2x | -3x | --] file.rom [args...]");