dressupgeekout / lunapurpura

Reimplementation of Purple Moon's games from the 1990s (WIP) - NOTE: ScummVM port in progress
https://dressupgeekout.github.io/lunapurpura/
BSD 2-Clause "Simplified" License
8 stars 1 forks source link

[Presage] Some extracted archive members have trailing spaces #53

Open dressupgeekout opened 4 years ago

dressupgeekout commented 4 years ago

For example:

charlotte@dawnchorus:~/devel/lunapurpura/TRICKY/j/IDNav ls -1 *\ .XPK
50031-NAV_EAST_3 .XPK
50074-AN_ODN .XPK
50113-BN_ODN .XPK
50151-CN_ODN .XPK
50190-DN_ODN .XPK
50811-DN_BULTN_2 .XPK
50813-DN_BULTN_4 .XPK

Observe the space character before the dot.

I can confirm this isn't a bug per se, but rather, that's how the file name is actually stored in the PRX. Notice the ASCII 0x20, which is the space character.

4E 41 56 5F 45 41 53 54 5F 33 20 00 00 00 00 00 00 00
N  A  V  _  E  A  S  T  _  3  ' '

Perhaps our PRX reader ought to trim all trailing whitespace unconditionally.

This won't actually affect games from running, this is only a convenience or a concession for human beings extracting individual files.