Hi,
Got this strange problem with C.
I have a program that reads a string, wich contains characters (duuh) that say where a dot should be drawn compared to the current position. 'd' means below the current position, 'l' means left of the current position, et c.
Now it works just fine if you'd just do 'dd', but with longer or more variated strings (like 'dduuullrurrlruuurld') it goes on for about three times ... and then segfaults. Wierd. When i compile, gcc doesn't complain at all. Maybe gdb would, but i don't know how to use it
I'm still in the testing phase, i have already achieved to control the dot, but commented the code out to make the snake's tail work, wich is the hardest part. btw, it's a classical snake game.
If you would like to compile it, make sure you've got svgalib libraries (/lib/libvga.so.*) properly installed. It's C, so say:
# gcc ./sneek.c -o ./sneek -lvga
Or do, what i always do for my own comfort:
# gcc ./sneek.c -o ./sneek -lvga && echo "
" && ./sneek
Here it goes: i appreciate all help !!! (now you know my real name
)