Autor Tema: BUG: freads and feof would freeze the program  (Leído 3433 veces)

josebita

  • Administrator
  • *****
  • Mensajes: 4039
  • Karma: 257
    • BennuGD Mobile Worklog
Re:BUG: freads and feof would freeze the program
« Respuesta #15 en: Noviembre 25, 2015, 10:18:56 am »
That should work, I gues...

josebita

  • Administrator
  • *****
  • Mensajes: 4039
  • Karma: 257
    • BennuGD Mobile Worklog
Re:BUG: freads and feof would freeze the program
« Respuesta #16 en: Diciembre 10, 2015, 11:30:43 am »
Pixel posted an updated "PixPlantilla". Have you been able to test the problem there?

JaViS

  • Global Moderator
  • *****
  • Mensajes: 1252
  • Karma: 26
    • Anarkade
Re:BUG: freads and feof would freeze the program
« Respuesta #17 en: Diciembre 10, 2015, 12:40:13 pm »
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

  • Administrator
  • *****
  • Mensajes: 4039
  • Karma: 257
    • BennuGD Mobile Worklog
Re:BUG: freads and feof would freeze the program
« Respuesta #18 en: Diciembre 10, 2015, 01:16:16 pm »
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!
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.
« última modificación: Diciembre 10, 2015, 02:27:15 pm por josebita »

panreyes

  • Administrator
  • *****
  • Mensajes: 2154
  • Karma: 74
    • panreyes.com
Re:BUG: freads and feof would freeze the program
« Respuesta #19 en: Diciembre 12, 2015, 06:47:05 pm »
By the way, the error I had was this one:
Código: [Seleccionar]
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