FreeFalcon / freefalcon-central

A campaign based, multiplayer, open source flight simulator.
http://freefalcon.org/
BSD 2-Clause "Simplified" License
157 stars 99 forks source link

Occasional bug when trying to load a font #18

Closed vinnydiehl closed 11 years ago

vinnydiehl commented 11 years ago

Sometimes this assertion fails, sometimes it doesn't. The file that it is trying to read is at art/ckptart/autofont/16x12font.rct in the FF install directory. The contents of str on the pass where it fails is "3 43 234 10 18 1\n"- only 6 numbers, when there should be 7 or more. It appears to reach the EOF one-off.

I can't exactly pin down the cause of this- it seems to crop up whenever it feels like it, and disappear whenever I try to observe it.

PeterMeyer commented 11 years ago

16x12font.rct is an Textfile. As far as i can see the formatstring expects 7 paramas, but in the last line (not the blank line at the end) is only a 6 params. Maybe sometimes it read everything and sometimes not. This might could explain this.Maybe you can simply add and 0 Param and see whats happend.

vinnydiehl commented 11 years ago

The cause of this issue is indeed a malformed font file. Solution: add a 1 param to the end of art/ckptart/autofont/16x12font.rct and call it a day. We need a better way to develop on the game content and share changes such as this one rather than word of mouth, so I'll work on a strategy for getting those files under version control.

vinnydiehl commented 11 years ago

art/ckptart/3dfont/16x12font.rct also has this malformation, add a 1 to the end of that also.