Skip to content

Doesn't handle splat's new string comments, raising ValueError #29

@2Tie

Description

@2Tie

In a recent version of splat, decoded strings add a block comment in the following line containing the original hex of the string, like so:

    /* 25B9A8 0035B828 */ .asciz "砂漠岩地"
    /* 8D BB 94 99 8A E2 92 6E 00 000000 */

currently, mwccgap doesn't handle lines with just a block comment, raising the ValueError in preprocessor.py.

my stopgap fix was to add the following lines before the raise ValueError line:

                if re.sub(r'/\*.*?\*/', '', line).strip() == "":
                    #ignore comment-only lines, i.e. after strings
                    continue

this snippet checks if there's only whitespace in a line after removing the block comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions