changeset 314:2b26edf2fe65

Don't generate a preamble for a zero-sized section
author lost
date Sun, 25 Jan 2009 16:45:31 +0000
parents c275e7e328d4
children 8550ff69fcc9
files src/output.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/output.c	Sat Jan 24 07:18:01 2009 +0000
+++ b/src/output.c	Sun Jan 25 16:45:31 2009 +0000
@@ -80,6 +80,11 @@
 			// no output for a BSS section
 			continue;
 		}
+		if (sectlist[sn].ptr -> codesize == 0)
+		{
+			// don't generate output for a zero size section
+			continue;
+		}
 		// write a preamble
 		buf[0] = 0x00;
 		buf[1] = sectlist[sn].ptr -> codesize >> 8;