Skip to content

Commit

Permalink
Merge pull request #389 from JupiterRider/master
Browse files Browse the repository at this point in the history
[raygui] don't trim leading and trailing white spaces (fix #351)
  • Loading branch information
gen2brain authored May 18, 2024
2 parents 2915c1c + a158bd4 commit 5314a4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion raygui/raygui.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}()

Expand Down

0 comments on commit 5314a4a

Please sign in to comment.