Skip to content
This repository was archived by the owner on Apr 27, 2023. It is now read-only.
This repository was archived by the owner on Apr 27, 2023. It is now read-only.

Improve to handle `struct.pack('c', ...) #4

@EnTerr

Description

@EnTerr

Minor improvement, so 'c' format can be handled for single characters w/o n appended (i.e. 'c', not only 'c1'):

      local n = format:sub(i + 1):match('^%d+') or ''
      local length = tonumber(n) or 1

It's a cheap fix. Also because of no '^' in pattern before, it would jump ahead to find a number and then i = i + n:len() would mess up progress in the pattern.

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