Skip to content

buf[i] not working sometimes #22

@andrewrk

Description

@andrewrk

Causing zlib-browserify to be broken: brianloveswords/zlib-browserify#6

To produce the issue:

  1. Clone this gist
  2. browserify test.js >out.js
  3. Copy out.js into jsbeautifier.org and then paste back into out.js
  4. Add a debugger statement like this:
                        debugger
                        a.C = l[k++];
                        a.D = l[k++];
                        (31 !== a.C || 139 !== a.D) && m(Error("invalid file signature:", a.C, a.D));
  1. run in the browser

You will notice that l is a Buffer and l[0] is yielding undefined when it should yield 31. Note also that l.parent[0] works.

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