Mostly this enables attempted recursive parsing of submessages. Note
that it is inherently impossible to determine the underlying data type
for LengthDelimited for sure, so this is a best-effort attempt. The user
can disable recursive submessage parsing via Settings.
Other minor changes:
* added #pragma MIME and #pragma endian directives
* enabled UTF-8 display for LengthDelimited types
* added signed LEB128 display for Varint types (although this doesn't
seem to be working on my test case)
* swapped if/else-if structure for match
* fail upon receiving unknown or unsupported WireType
Co-authored-by: Nik <werwolv98@gmail.com>
* Fix bencode dictionary
When parsing a bencode dictionary, the end character 'e' was never
consumed. This caused a misinterpretation of the character as struct Value of
an unknown type 'e'.
* Fix bencode list
A list was not included in the Value's parsing logic so it may have
been mistakenly parsed as a string.
* Fix std::ctype::isprint not including space
The space character, 0x20, is considered as a printable character in ASCII
and in >=C89. Adding it to the range of std::ctype::isprint also fixes
other std::ctype functions that use it.
* Fix bencode byte string formatting
Byte strings do not render nicely in pattern data's value column if they
contain non-printable characters. This commit makes the value of byte
strings to be surrounded by quotation marks, and renders a warning text
without quotation marks if the byte string contains non-printable
characters.
* add support for cartridge size type $54
Added support for cartridge size type $54, corresponding to 1.5 MiB (96 banks).
* add missing license
* Add GBA Cartridge Header
* Update README.md
Added GBA information to README.md and corrected a typo.
* Add DS Cartridge Header
* Update ReadMe.md
* Update pyc.hexpat
Included additional versions
* Implement Windows thumbcache pattern
* Include thumbcache pattern in README.md
* Update thumbcache.hexpat
- Use English warning text
- handle unknown file version
- add thanks to joachimmetz
- create virtual file
- use more elegant magic type
* Update thumbcache.hexpat
- Use padding data type for paddings
* Update thumbcache.hexpat
- make pattern more robust against single erroneous cache record
* patterns/zip: simplify find_sequence_in_range check
hex(340282366920938463463374607431768211455) =
0xffffffffffffffffffffffffffffffff
* patterns/7z: use Magic<> for signature, add pragma
* patterns/{nro, ogg}: use Magic<> for signature
* patterns/ttf: refactor, check magic
Use the "Field field @ position;" syntax instead of saving and restoring
the cursor position.
* readme: fix copy-paste error in pattern listing
Fixes#348
In issue #348 it is stated that the pattern fails to find the variable baseAddress in the parent of the parent of the attribute function. One parent is required to access the variables on the pattern that is using the attribute.
That pattern is used in the pattern that contains baseAddress as a pointer to an array of the children pattern and that seems to require an extra parent level to be added in order to access baseAddress without errors. The fix was tested on an xbe file extracted from an xbox cd rom and while it failed without the fix as stated in issue 348 with the fix it ran to completion without issues.
In issue #346 it is noted that the format functions return the same value repeatidly and erroneously. This is due to the use of global variables which result on only their last value being used in format functions due to their delayed evaluation. Fixed by using local variables instead. Also remove tabs from the file and an unused tags variable.
* Added: BZip3 Compression
* Fixed: Bound the SmallBlock data by parent's size
* Improved: Now uses the name 'Chunk' for block wrappers, such that the name 'block' matches with what the BZ3 API does
* Improved: Import rather than Include std::mem
* Added: Missing 'description' field in pragma