[raygui] don't trim leading and trailing white spaces (fix #351)

This commit is contained in:
JupiterRider 2024-05-18 17:56:40 +02:00
parent 2915c1c582
commit a158bd444e

View file

@ -970,7 +970,7 @@ func TextBox(bounds rl.Rectangle, text *string, textSize int, editMode bool) boo
}
ctext := (*C.char)(unsafe.Pointer(&bs[0]))
defer func() {
*text = strings.TrimSpace(strings.Trim(string(bs), "\x00"))
*text = strings.Trim(string(bs), "\x00")
// no need : C.free(unsafe.Pointer(ctext))
}()