shithub: scc

Download patch

ref: bc25f9e6251bd9f8d5330988e0965fde4588d988
parent: 2c2418c44c0004a67f74c754790cfdfbb01907a7
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Mon Mar 12 14:32:18 EDT 2018

[nm] Fix "portable format"

The format string was wrong because it didn't have a space
betwee the letter and the value and tthe type of the size
was wrong.

--- a/nm/main.c
+++ b/nm/main.c
@@ -142,11 +142,11 @@
 		printf("%s %c", sym->name, sym->type);
 		if (type != 'U') {
 			if (radix == 8)
-				fmt = "%llo %llo";
+				fmt = " %16.6llo %lo";
 			else if (radix == 10)
-				fmt = "%llu %llu";
+				fmt = " %016.16llu %lu";
 			else
-				fmt = "%llx %llx";
+				fmt = " %016.16llx %lx";
 			printf(fmt, sym->value, sym->size);
 		}
 	} else {