X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=direct.c;h=4a9311c816d7dae54010af3ee7625a7ed85ccbf8;hp=d3e03031d51a108855632ec7aa9d55af2c3df6dd;hb=2cc3049ac981e8485698b7592397bd66ddb5d9d0;hpb=daf2f61a3664329ae7f9609e1e14da2b8780fd10 diff --git a/direct.c b/direct.c index d3e0303..4a9311c 100644 --- a/direct.c +++ b/direct.c @@ -333,6 +333,13 @@ int d_incbin(void) long pos, size; char buf; + // Check to see if we're in BSS, and, if so, throw an error + if (scattr & SBSS) + { + errors("Cannot include binary file \"%s\" in BSS section", string[tok[1]]); + return ERROR; + } + if (*tok != STRING) { error(syntax_error); @@ -345,7 +352,12 @@ int d_incbin(void) size = lseek(j, 0L, SEEK_END); chcheck(size); pos = lseek(j, 0L, SEEK_SET); - + + DEBUG + { + printf("INCBIN: File '%s' is %li bytes.\n", string[tok[1]], size); + } + for(i=0; i