From 824abdcc9b6fe1bf6e09350218297f3ee81c039d 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 d62c23f2..f075aee2 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++; }