From 635d3de67b29ee18e49a9eb61bceb8bafaa5c9ac Mon Sep 17 00:00:00 2001 From: neauoire Date: Mon, 8 Feb 2021 14:37:23 -0800 Subject: [PATCH] Removed global --- emulator.c | 2 ++ uxn.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/emulator.c b/emulator.c index 61b07bf..355e19c 100644 --- a/emulator.c +++ b/emulator.c @@ -53,12 +53,14 @@ int main(int argc, char *argv[]) { Uxn cpu; + if(argc < 2) return error(&cpu, "No input.", 0); if(!load(&cpu, argv[1])) return error(&cpu, "Load error", 0); if(!boot(&cpu)) return error(&cpu, "Boot error", 0); + /* print result */ echos(&cpu.wst, 0x40, "stack"); echom(&cpu.ram, 0x40, "ram"); diff --git a/uxn.c b/uxn.c index 97f231d..4b0e52e 100644 --- a/uxn.c +++ b/uxn.c @@ -13,8 +13,6 @@ WITH REGARD TO THIS SOFTWARE. #include "uxn.h" -Uxn cpu; - #pragma mark - Operations /* clang-format off */