delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/07/05:54:48

Message-ID: <343A14FF.41F2@post.comstar.ru>
Date: Tue, 07 Oct 1997 13:54:55 +0300
From: Dim Zegebart <zager AT post DOT comstar DOT ru>
Reply-To: zager AT post DOT comstar DOT ru
Organization: Comstar Ltd.
MIME-Version: 1.0
To: DJGPP Mail List <djgpp AT delorie DOT com>
Subject: SOLVED !!!! Re: Strange problem again.
References: <3439D9B8 DOT 4C40 AT post DOT comstar DOT ru>

Dim Zegebart wrote:
> 
> The line in malloc() is
> 
>   /* remove from linked list */
>   nextf[bucket] = op->ov_next;

Guys !!! I found it !!! It was in two years old code ported from TC.
The problem obvious :

char *buf;
int l;
FILE *f;
...
l=filelength(fileno(f));
buf=(char*)malloc(l+1);
buf[l+1]=0; // !!!!!!!!!!!!!!!! Here is (was) my problem ( buf[l]; is
correct )

Thank's for all who help me to solve it !

-- 
Regards,
Dim Zegebart, 
Moscow Russia.
Ghostly basement : http://www.geocities.com/siliconvalley/pines/7817
DZCOMM - comm library for Allegro

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019