carlito913 / editor-on-fire

Automatically exported from code.google.com/p/editor-on-fire
Other
0 stars 0 forks source link

Scores in song.ini are corrupted during MIDI import #195

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
As reported here:
http://www.fretsonfire.net/forums/viewtopic.php?f=3&t=49886&p=562940#p562938

During import, the scores are corrupted during save.  I have posted a sample of 
the original song.ini before MIDI import and the broken song.ini that is 
created during save:
http://www.sendspace.com/file/y1k38t

When the score is corrupted like this, it apparently makes the chart unplayable 
in FoF.

Original issue reported on code.google.com by raynebc on 5 Nov 2010 at 11:47

GoogleCodeExporter commented 8 years ago
This is a buffer overrun error. The INI settings structure only holds 512 
characters and the entry is longer than that. The buffer overrun could be fixed 
by using snprintf(). The scores would still get truncated.

I would prefer to not import scores for now. The proposed project format 
addresses this issue and it will be fixed when we implement the new format.

Original comment by xander4j...@yahoo.com on 6 Nov 2010 at 12:03

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I see.  The import logic allows for a 1024 sized buffer, but the INI settings 
are stored in a 512 byte array after import.  Fixing the overrun would be the 
first thing to do, I suppose.  And until the new format is implemented, the 
score should probably be skipped as you suggest, because truncating them will 
corrupt them anyway.

Original comment by raynebc on 6 Nov 2010 at 12:12

GoogleCodeExporter commented 8 years ago

Original comment by xander4j...@yahoo.com on 6 Nov 2010 at 12:13

GoogleCodeExporter commented 8 years ago

Original comment by xander4j...@yahoo.com on 6 Nov 2010 at 12:19