Skip to content

Commit

Permalink
Merge pull request #3907 from flysand7/console-read-fix
Browse files Browse the repository at this point in the history
[core/os]: Fix read_console edge case bug
  • Loading branch information
gingerBill committed Jul 12, 2024
2 parents 9e0c409 + a7d95ab commit e715674
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/os/file_windows.odin
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ read_console :: proc(handle: win32.HANDLE, b: []byte) -> (n: int, err: Errno) {
src := buf8[:buf8_len]

ctrl_z := false
for i := 0; i < len(src) && n+i < len(b); i += 1 {
for i := 0; i < len(src) && n < len(b); i += 1 {
x := src[i]
if x == 0x1a { // ctrl-z
ctrl_z = true
Expand Down

0 comments on commit e715674

Please sign in to comment.