From: Alan Cox Date: Mon, 30 Oct 2017 17:42:25 +0000 (+0000) Subject: ld: don't break if the symbol unused bytes are nn zero X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=b284ab240fa010e0444ee717992bf78dc5412920;p=FUZIX.git ld: don't break if the symbol unused bytes are nn zero --- 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)); }