Skip to content

Fixed a few buffer overrun bugs...#154

Merged
mikeb01 merged 1 commit into
masterfrom
ebowden/char-fix
May 27, 2026
Merged

Fixed a few buffer overrun bugs...#154
mikeb01 merged 1 commit into
masterfrom
ebowden/char-fix

Conversation

@strangelydim

Copy link
Copy Markdown
Contributor

... due to having assumed a "char" was just 1 byte (it is 2 bytes in .NET), and fixed a loop index bug that caused GetStringAscii to return a string that was just the first character repeated multiple times.

@mikeb01

mikeb01 commented May 26, 2026

Copy link
Copy Markdown
Contributor

Is it possible to get a unit test on this to show the problem?

…st 1 byte (it is 2 bytes in .NET), and fixed a loop index bug that caused GetStringAscii to return a string that was just the first character repeated multiple times.
@strangelydim

Copy link
Copy Markdown
Contributor Author

Is it possible to get a unit test on this to show the problem?

Yep, just added. Ironically, I created the unit tests earlier to demonstrate to myself that this was a real problem, and then just didn't commit them.

@mikeb01 mikeb01 merged commit 166f386 into master May 27, 2026
4 checks passed
@mikeb01 mikeb01 deleted the ebowden/char-fix branch May 27, 2026 20:55
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