Article View: comp.sources.bugs
Article #899Nethack bug in termcap.c
From: Brian Westley
Date: Fri, 21 Aug 1987 13:32
Date: Fri, 21 Aug 1987 13:32
13 lines
896 bytes
896 bytes
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
Technical Details
Message-ID:
<152@starfire.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!rosevax!rose3!starfire!merlynShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!rosevax!rose3!starfire!merlyn From: merlyn@starfire.UUCP (Brian Westley) Newsgroups: comp.sources.bugs Subject: Nethack bug in termcap.c Message-ID: <152@starfire.UUCP> Date: Fri, 21-Aug-87 09:32:23 EDT Article-I.D.: starfire.152 Posted: Fri Aug 21 09:32:23 1987 Date-Received: Sun, 23-Aug-87 08:25:32 EDT Organization: Starfire Consultings Services, Mpls., MN Lines: 13 Keywords: Who wrote this ugly code?