Subject: join dumps core
To: None <netbsd-bugs@sun-lamp.cs.berkeley.edu>
From: John Brezak <brezak@ch.hp.com>
List: netbsd-bugs
Date: 12/24/1993 11:22:29
When rebuilding current, lorder was failing because join was dumping core.
Here is _a_ fix - not sure if it is right. The problem is that lp is basically
a NULL record. The filecnt is 0 as is fieldno and fields.

*** join.c~	Wed Dec 22 06:23:56 1993
--- join.c	Fri Dec 24 09:22:00 1993
***************
*** 451,457 ****
  	if (needsep++)
  		(void)printf("%c", *tabchar);
  	if (!ferror(stdout))
! 		if (lp->fieldcnt < fieldno) {
  			if (empty != NULL)
  				(void)printf("%s", empty);
  		} else {
--- 451,457 ----
  	if (needsep++)
  		(void)printf("%c", *tabchar);
  	if (!ferror(stdout))
! 		if (lp->fieldcnt < fieldno || lp->fields == NULL) {
  			if (empty != NULL)
  				(void)printf("%s", empty);
  		} else {

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 John Brezak                    UUCP:     uunet!apollo.hp!brezak
 Hewlett Packard/Apollo         Internet: brezak@ch.hp.com
 300 Apollo Drive               Phone:    (508) 436-4915
 Chelmsford, Massachusetts      Fax:      (508) 436-5103

------------------------------------------------------------------------------