You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull -u" and retry what you did to
reproduce the problem. Thanks.
What steps will reproduce the problem?
1. Using the attached files, do "make run", the call "./run"
What is the expected output? What do you see instead?
The C code fills a facsimile of SDL's keyboard event structure with
ascending numbers. Then the contents of the structure are printed using a C
function and a Go function. The printout should be
1 2 3 4 5 6 7
1 2 3 4 5 6 7
instead it's
1 2 3 4 5 6 7
1 2 3 5 6 7 0
The values for the fields in the nested struct that Go sees via cgo are all
off by one position. When told to print the whole struct, Go prints
{1 2 3 [0] {5 [0 0 0] 6 7 0 [0 0]}}
What is your $GOOS? $GOARCH?
linux amd64
Which revision are you using? (hg identify)
07fd78fe1d78 tip
Please provide any additional information below.
The test case replicates the issue I had with the actual SDL KeyboardEvent
struct without requiring the SDL headers. I did not have the same issue
with linux/386 Go.
This is not fixed yet, but I tracked it down. The issue is that
the alignment for the SDL_Keysym field is apparently 8 instead of 4.
Related to issue #482.
Attachments:
The text was updated successfully, but these errors were encountered: