Merge pull request #389 from JupiterRider/master
[raygui] don't trim leading and trailing white spaces (fix #351)
This commit is contained in:
commit
5314a4a209
1 changed files with 1 additions and 1 deletions
|
@ -970,7 +970,7 @@ func TextBox(bounds rl.Rectangle, text *string, textSize int, editMode bool) boo
|
||||||
}
|
}
|
||||||
ctext := (*C.char)(unsafe.Pointer(&bs[0]))
|
ctext := (*C.char)(unsafe.Pointer(&bs[0]))
|
||||||
defer func() {
|
defer func() {
|
||||||
*text = strings.TrimSpace(strings.Trim(string(bs), "\x00"))
|
*text = strings.Trim(string(bs), "\x00")
|
||||||
// no need : C.free(unsafe.Pointer(ctext))
|
// no need : C.free(unsafe.Pointer(ctext))
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue