--- ray/src/common/otypes.c 1989/02/02 10:34:38 1.1 +++ ray/src/common/otypes.c 1990/01/05 09:16:40 1.3 @@ -133,13 +133,14 @@ register struct ohtab *tab; tab->hsiz = nexthsiz(tab->hsiz); tab->htab = (OBJECT *)malloc(tab->hsiz*sizeof(OBJECT)); if (tab->htab == NULL) - error(SYSTEM, "out of memory in tputo"); + error(SYSTEM, "out of memory in otndx"); ndx = tab->hsiz; while (ndx--) /* empty it */ tab->htab[ndx] = OVOID; } /* look up object */ hval = shash(name); +tryagain: for (i = 0; i < tab->hsiz; i++) { ndx = (hval + i*i) % tab->hsiz; if (tab->htab[ndx] == OVOID || @@ -156,5 +157,5 @@ register struct ohtab *tab; tab->htab[i] = oldhtab[ndx]; } free((char *)oldhtab); - return(otndx(name, tab)); + goto tryagain; /* should happen only once! */ }