Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: remove newlines from debugger input #1407

Merged
merged 1 commit into from
Aug 25, 2024

Conversation

atsampson
Copy link
Contributor

Changes proposed in this pull request:

  • The fd command in the debugger didn't work, because the debugger code expects the d to be followed by \0 in the input buffer. Fix amiberry's version of console_get to strip newline characters from the end of the string it returns, as the Windows version does (rather than just adjusting the length value).

@midwan

The "fd" command didn't work in the debugger. This was because the "d"
was followed in the input buffer by \n rather than \0.

The Windows version of console_get replaces the terminating \r with \0.
amiberry's version uses fgets, which doesn't do this; it did adjust the
length value returned, but the debugger code doesn't look at the length.

Make it actually strip the newline characters when adjusting the length.
Copy link
Collaborator

@midwan midwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@midwan midwan merged commit f486ec0 into BlitterStudio:preview Aug 25, 2024
17 checks passed
midwan pushed a commit that referenced this pull request Aug 26, 2024
The "fd" command didn't work in the debugger. This was because the "d"
was followed in the input buffer by \n rather than \0.

The Windows version of console_get replaces the terminating \r with \0.
amiberry's version uses fgets, which doesn't do this; it did adjust the
length value returned, but the debugger code doesn't look at the length.

Make it actually strip the newline characters when adjusting the length.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants