From e853a516dc99c01835a1955b88d8608f1e2e24f3 Mon Sep 17 00:00:00 2001 From: Luxferre Date: Mon, 22 Aug 2022 20:16:44 +0300 Subject: [PATCH] Fixed size detection --- nrj.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nrj.c b/nrj.c index 0773f8f..9babebe 100644 --- a/nrj.c +++ b/nrj.c @@ -11,7 +11,7 @@ #ifndef NRJWORD #define NRJWORD unsigned short #endif -#define NRJWSIZE (sizeof(NRJWORD)) +#define NRJWSIZE (sizeof(NRJWORD) << 3) #define NRJSIZE (1 << NRJWSIZE) #define MAXADDR ((NRJWORD) (NRJSIZE - 1)) @@ -77,11 +77,11 @@ int main(int argc, char* argv[]) { nrj_run(mem, 3); } else { - printf("NRJ16: could not open the input file %s\r\n", argv[1]); + printf("NRJ%u: could not open the input file %s\r\n", (unsigned int) NRJWSIZE, argv[1]); return 1; } } else { - puts("NRJ16: no binary specified\r"); + printf("NRJ%u: no binary specified\r\n", (unsigned int) NRJWSIZE); return 1; } return 0;