[comp.sources.bugs] Nethack bug in termcap.c

merlyn@starfire.UUCP (Brian Westley) (08/21/87)

The code in termcap.c that copies the standout strings into new
strings (without the leading nulls) isn't alloc'ing enough space.
Change the following two lines:

	    HI = (char *) alloc(strlen(SO));
	    HE = (char *) alloc(strlen(SE));

To this, to allow room for a terminating null:

	    HI = (char *) alloc(strlen(SO)+1);
	    HE = (char *) alloc(strlen(SE)+1);

Merlyn Leroy