From 3de7f959d3a0fe9a011f7c00d88f540f30a0ab42 Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 10 Aug 1987 14:06:37 +0000 Subject: [PATCH] fix to fix --- util/arch/archiver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/arch/archiver.c b/util/arch/archiver.c index d62c23f2f..f075aee2f 100644 --- a/util/arch/archiver.c +++ b/util/arch/archiver.c @@ -700,12 +700,13 @@ enter_name(namep) tab[tnum].ran_off = tssiz; tab[tnum].ran_pos = offset; - for (cp = namep->on_mptr; *cp; cp++) { + for (cp = namep->on_mptr;; cp++) { if (tssiz >= strtabsz) { tstrtab = realloc(tstrtab, (strtabsz += 4096)); if (! tstrtab) error(TRUE, "string table overflow\n"); } tstrtab[tssiz++] = *cp; + if (!*cp) break; } tnum++; } -- 2.34.1