Fixed size detection
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user