这是indexloc提供的服务,不要输入任何密码
Skip to content

Incorrect input code #73

@ldemailly

Description

@ldemailly

Your code crashes when you get 32 bytes,.... because of how you treat it as a C string of the same length so it's not nul terminated when reading the whole 32

You should use the return value or read() not just to check for <0 (and thus not need the \0 filling either, also note that \0 is possible/valid in the terminal stream)

Also the big switch that sets every ascii code to… the same value is very unnecessary

(repeating from discord where this might have been lost)

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