Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BitBurner: main.bundle.js #33

Open
gnordlan opened this issue May 8, 2023 · 0 comments
Open

BitBurner: main.bundle.js #33

gnordlan opened this issue May 8, 2023 · 0 comments

Comments

@gnordlan
Copy link

gnordlan commented May 8, 2023

I attempted to use this tool to unminify the main.bundle.js file that comes with a normal install of BitBurner.

I discovered two issues, and was stuck on the second one.

1st.
return { field1: value1, field2: value2 ... }
The tokenizer in this library fails on the second ":" character. It doesn't understand an "any" object construction with multiple fields following a return. I managed by bypass this by changing a few hundred instances in the source file to:
return new { field1: value1, field2: value2 ... }
Which it handled fine.

2nd.
The output code looked like this:

      function a(e) {
        let e = 1;
        for (let e = 0; e < n; e++) {
            ...
        }
        for (let e = 0; e < t; e++) {
        ...

It is reassigning the variable "e" many times... In many different functions. Too many to fix by hand. I assume it's failing to correctly reassign/map the variable names?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant