mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 03:27:48 +00:00
nintendoswitch: fix crash when printing long lines (> 120)
This commit is contained in:
@@ -46,7 +46,7 @@ var stdoutBuffer = make([]byte, 120)
|
||||
var position = 0
|
||||
|
||||
func putchar(c byte) {
|
||||
if c == '\n' || position > len(stdoutBuffer) {
|
||||
if c == '\n' || position >= len(stdoutBuffer) {
|
||||
nxOutputString(&stdoutBuffer[0], uint64(position))
|
||||
position = 0
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user