Make INCBIN's length argument optional

INCBIN can now be used with just a start position to include everything
from the start position until the end of the file.
This commit is contained in:
Matt Currie
2020-08-15 17:20:13 +12:00
parent cb4fbdfcd5
commit f863a927c1
5 changed files with 33 additions and 8 deletions

View File

@@ -1073,7 +1073,12 @@ include : T_POP_INCLUDE string {
;
incbin : T_POP_INCBIN string {
out_BinaryFile($2);
out_BinaryFile($2, 0);
if (oFailedOnMissingInclude)
YYACCEPT;
}
| T_POP_INCBIN string ',' const {
out_BinaryFile($2, $4);
if (oFailedOnMissingInclude)
YYACCEPT;
}