Mail Archives: djgpp/1998/10/21/20:57:00.2
matthew DOT krause AT juno DOT com wrote:
>
> Okay, I had thought it was some kind of subtle bug in my code (Thanks
> Eli!) Anyone care to find it. I modified the code, but i can't remember
> how (bad form, I know). But the program now crashes under Rhide, but not
> when its run without Rhide. Still, the blasted bug is still there
> somewhere. Anyone care to help me find it? Please! I'm kinda new at this
> still.
> Thanks
>
> Here's my code:
> #include <stdlib.h>
> #include <stdio.h>
>
> #include "allegro.h"
> #include "fog.h"
>
> int main(int argc, char *argv[])
> {
> DATAFILE *datafile;
>
> allegro_init();
> //install_timer();
> //install_mouse();
> install_keyboard();
> set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0);
You should check these for success; if they fail, future Allegro
functions may crash.
> fixup_datafile(datafile);
> datafile = load_datafile("fog.dat"); //From previous//
`datafile' is an uninitialized pointer. You probably mean to use `data'
from "fog.h". Also, why load the datafile if it's compiled in? You
might want to read GRABBER.TXT for more info on using compiled
datafiles; what you've got is rather shaky.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -