error out if both -o and -c are specified

This commit is contained in:
anthony
2009-12-30 19:47:44 -07:00
parent 77bbbba9f3
commit 2d72b12eb8

View File

@@ -294,10 +294,16 @@ main(int argc, char *argv[])
ulOptions |= OPTF_QUIET; ulOptions |= OPTF_QUIET;
break; break;
case 'o': case 'o':
if (ulOptions & OPTF_GBCMODE) {
FatalError("-c and -o can't be used together");
}
ulOptions |= OPTF_GBCMODE; ulOptions |= OPTF_GBCMODE;
gbc_mode = 0xC0; gbc_mode = 0xC0;
break; break;
case 'c': case 'c':
if (ulOptions & OPTF_GBCMODE) {
FatalError("-c and -o can't be used together");
}
ulOptions |= OPTF_GBCMODE; ulOptions |= OPTF_GBCMODE;
gbc_mode = 0x80; gbc_mode = 0x80;
break; break;