Mail Archives: djgpp/1998/09/28/09:38:02
On Mon, 28 Sep 1998, EFT.Eric Devolder wrote:
> > When I compile the program like this: gcc -o hot2std.exe hot2std.c
> > it works perfeclty.
> > If I try to compile with optimization (gcc -O[1,2 or 3] -o hot2std.exe
> > hot2std.c), I get strange outputs, compared to those of the debug
> > version.
This line is the villain:
sprintf(temp,"0002%06.6ldA%019.19s \n"
This produces 33 characters, including the terminating '\0', whereas
temp[] is declared as "char temp[32];".
I don't know whether there are any more problems in your program.
- Raw text -