scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit 7e3fa9b203382ef638cae9bf9b4de9e01bdac836
parent e809687b2a03e48c4c2387bfeb04d18cad8ab651
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Mon, 12 Mar 2018 18:32:18 +0100

[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.

Diffstat:
Mnm/main.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/nm/main.c b/nm/main.c @@ -142,11 +142,11 @@ printsym(char *file, char *member, struct symbol *sym) 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 {