Fix #175: Only sanity check final section size if no user errors occurred.

svn path=/trunk/yasm/; revision=2203
This commit is contained in:
Peter Johnson 2009-06-12 07:06:16 +00:00
parent a498736454
commit db5f343748

View file

@ -793,7 +793,8 @@ coff_objfmt_output_section(yasm_section *sect, /*@null@*/ void *d)
coff_objfmt_output_bytecode);
/* Sanity check final section size */
if (csd->size != yasm_bc_next_offset(yasm_section_bcs_last(sect)))
if (yasm_errwarns_num_errors(info->errwarns, 0) == 0 &&
csd->size != yasm_bc_next_offset(yasm_section_bcs_last(sect)))
yasm_internal_error(
N_("coff: section computed size did not match actual size"));
}