Merge pull request #3907 from flysand7/console-read-fix

[core/os]: Fix read_console edge case bug
This commit is contained in:
gingerBill
2024-07-12 14:58:40 +01:00
committed by GitHub
+1 -1
View File
@@ -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