]> granicus.if.org Git - yasm/commitdiff
Fix #175: Only sanity check final section size if no user errors occurred.
authorPeter Johnson <peter@tortall.net>
Fri, 12 Jun 2009 07:06:16 +0000 (07:06 -0000)
committerPeter Johnson <peter@tortall.net>
Fri, 12 Jun 2009 07:06:16 +0000 (07:06 -0000)
svn path=/trunk/yasm/; revision=2203

modules/objfmts/coff/coff-objfmt.c

index b9f4494ebbb45692f0631c83966ce46f1102d278..b41915725e514a8f7ef6ae9fc79c7f645a520d53 100644 (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"));
     }