From b284ab240fa010e0444ee717992bf78dc5412920 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 30 Oct 2017 17:42:25 +0000 Subject: [PATCH] ld: don't break if the symbol unused bytes are nn zero --- Applications/MWC/cmd/asz80/ld.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Applications/MWC/cmd/asz80/ld.c b/Applications/MWC/cmd/asz80/ld.c index 0fdc7eab..a1802f95 100644 --- a/Applications/MWC/cmd/asz80/ld.c +++ b/Applications/MWC/cmd/asz80/ld.c @@ -128,11 +128,10 @@ struct symbol *find_symbol(const char *name, int hash) static uint8_t hash_symbol(const char *name) { int hash = 0; - uint8_t n = 16; + uint8_t n = 0; - do { + while(*name && n++ < 16) hash += *name++; - } while (--n); return (hash&(NHASH-1)); } -- 2.34.1