commit e853a516dc99c01835a1955b88d8608f1e2e24f3
parent 1022bb1cfb80b07890168f3100d8a5cdd65e943f
Author: Luxferre <lux@ferre>
Date: Mon, 22 Aug 2022 20:16:44 +0300
Fixed size detection
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git 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;