Skip to content

importer.getExitCondition() fails if file less than 1KB #134

@StokesMIDE

Description

@StokesMIDE

getExitCondition() scans the last 1000 bytes of a recording to find the exit condition info. If the file is less than 1000 bytes, it attempts to seek() to a negative position in the file.

Since no 'real' IDEs are ever that small, This is sort of an edge case, but an easy fix: recording.seek(max(0, os.path.getsize(filename) - bytesRead))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingioRelated to (file) reading and writing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions