Skip to content

Bug in options parsing #103

@NappingPiglet

Description

@NappingPiglet

if 'z' in mapoptions or mapoptions[0].isdigit():

Likely this is me being dumb, but I tried:

!map -options -mapsize 60x60 -bg https://www.dungeonscrawl.com/_next/static/media/fortress.eba6fae5.png

and got

Traceback (most recent call last):
Line 87, col 28
if 'z' in mapoptions or mapoptions[0].isdigit():
^^^^^^^^^^^^^
IndexError: string index out of range

Not sure if the logic is wrong, or if this will always fail as if there is a - in there

!map -options -djdjdj

So I think the issue is in the assumption that maptoptions only followed by the correct format, maybe a quick linting of the next option

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