[Mit-cadr-cvs] r353 - trunk/emulator/usim

ggilley at common-lisp.net ggilley at common-lisp.net
Fri Nov 23 23:26:04 UTC 2012


Author: ggilley
Date: Fri Nov 23 15:26:04 2012
New Revision: 353

Log:
make sure label is padded

Modified:
   trunk/emulator/usim/diskmaker.c

Modified: trunk/emulator/usim/diskmaker.c
==============================================================================
--- trunk/emulator/usim/diskmaker.c	Fri Nov 23 15:24:09 2012	(r352)
+++ trunk/emulator/usim/diskmaker.c	Fri Nov 23 15:26:04 2012	(r353)
@@ -115,6 +115,11 @@
 	p->ptype = ptype;
 	strncpy(p->label, label, 16);
 	p->label[16] = '\0';
+
+	// make sure the label is padded out with spaces
+	for (size_t i = strlen(p->label); i < 16; i++)
+        	p->label[i] = ' ';
+
 	p->filename = filename;
 	return 0;
 }




More information about the mit-cadr-cvs mailing list