Skip to content

Handling of multi-packet responses in Develop branch places a newline in a line that gets split between two packets #110

@HoodedDeath

Description

@HoodedDeath

I was attempting a fix for #103 myself before realizing there was work on that in the Develop branch, so I tested it out as I can reproduce the issue reliably. The current approach results in a newline being inserted into a line of text if that line got split between two packets. The example I have is in the middle of the 'help' command:

/statistics [entities|block-entities]

/mobcap
s
/createScroll <spell> <level>

The second line is supposed to be the command /mobcaps, but the 's' ends up in the next packet, and thus on a new line.

I don't have a fix for the relevant code in the Develop branch, but I can offer my own attempt to handle multi-packet responses in my fork based on your master branch. I have no idea how bad or maybe good my implementation is, as I have very little C experience, but what I ended up with handled responses without issue in my testing, including multi-packet responses and avoided splitting a line when it fell between two packets. If wanted, I can make a PR, just let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions