Fixed size detection

This commit is contained in:
Luxferre
2022-08-22 20:16:44 +03:00
parent 1022bb1cfb
commit e853a516dc
+3 -3
View File
@@ -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;