Skip to content
This repository was archived by the owner on Jul 3, 2025. It is now read-only.
This repository was archived by the owner on Jul 3, 2025. It is now read-only.

Bug in (de)serialization with E2 includes #82

@CaptainPRICE

Description

@CaptainPRICE

The following error appears:
sv: (lib/whatever)Unknown character found (\) at line 1, char 7

Steps to reproduce:

  • Spawn the following E2:

    main.txt

    print(1)
    #include "lib/whatever"
    print(3)

    lib/whatever.txt

    print("[whatever] Line 1")
    print("[whatever] Line 2")
  • Create the dupe of the spawned E2.

  • Open the dupe from the saved file (important).

  • Paste the saved dupe.

I have inspected the contents of the dupe (text) file quickly, and it seems like " chars from the main code/file are replaced with £ char, and newline is being replaced via char.
But, if you look at the code of the lib/whatever, you will see it didn't make those replacements on #include'd codes, it is seems like it is saving it using string.format("%q", contents_of_included_code).
I have tried to manually fix the dupe file, by doing replacements for the included code, but it seems to be non-fixable.
There's some bug with how E2 with #includes are being (de)serialized.

Here's the saved dupe file for faster bug reproduce:
e2_with_include.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions