Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Issue #257 for insane program names
This change replaces the Name and ShortName on ProgramDescription in XML serialization with the MetadataString class. This fixes issue #257, which is a crash due to bad data being parsed from ROM metadata. The contributing factors were: 1. Bug parsing metadata from scrambled ROMs (fixed previously) 2. Bad behaviors in XmlSerializer - valid UNICODE strings containing non-XML-safe characters can be serialized, but not de-serialized 3. intvname would pass along arbitrary bytes These are addressed in different ways. Item 1 was addressed in commit 5446f34. Item 3 was fixed in jzintv as of SVN revision 1840, though subsequent changes have improved upon the UTF-8 support. Those changes in jzintv result in 'unusual' characters being escaped when written to to .cfg files or returned via the intvname utility. Item 2 is addressed in this change, via the MetadataString class and the altering of how ProgramDescription is serialized via XML. The Copy test for ProgramDescription was updated to include the new XmlName and XmlShortName properties, as well as setting a non-trivial ShortName that requires escaping the characters. Also, the XmlSerializer parsing tests were updated to test strings that needed to be escaped. These are somewhat redundant, in that MetadataString already covers serialization of itself. The new tests here validate the behaviors not of the XML parsing, so much as the correct API surface of the ProgramDescription class itself -- namely that its Name and ShortName properties behave correctly. Further validation was done with hand testing on a large, existing ROM and menu layout.
- Loading branch information
Showing
2 changed files
with
196 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters