BUG: freads and feof would freeze the program

Started by JaViS, November 22, 2015, 11:41:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

josebita


josebita

Pixel posted an updated "PixPlantilla". Have you been able to test the problem there?

JaViS

Quote from: josebita on December 10, 2015, 11:30:43 AM
Pixel posted an updated "PixPlantilla". Have you been able to test the problem there?
Nope, I haven't. My code got bigger by now, and I have much work to do to make it compatible with pixstudio.
I'm pretty close to be able to show something from the game, so I've decided to wait until that.

Enviado desde mi Nexus 6 mediante Tapatalk

Working on Anarkade. A couch multiplayer 2D shooter.

josebita

#18
Ok, I've closed the bug in bitbucket since the behaviour is corrected in my tests, but let me know if you test it.

I'm hoping to see your next project soon!
Quote from: JaViS on December 10, 2015, 12:40:13 PM
Quote from: josebita on December 10, 2015, 11:30:43 AM
Pixel posted an updated "PixPlantilla". Have you been able to test the problem there?
Nope, I haven't. My code got bigger by now, and I have much work to do to make it compatible with pixstudio.
I'm pretty close to be able to show something from the game, so I've decided to wait until that.

panreyes

By the way, the error I had was this one:

fp = fopen("file.txt",O_READ);
if(fp[b]>[/b]0)
while(!feof(fp))
   line=fgets(fp);
end
end
fclose(fp);


fopen may return a negative int in Android, so if you're checking if the int is below 0, it won't work.

You need to check if it's not zero.

Ps: I can't explain myself in english easily, see you in the spanish forum next time xD