diff options
| author | Andrew Gallant <jamslam@gmail.com> | 2013-12-28 10:02:18 -0500 | 
|---|---|---|
| committer | Přemysl Janouch <p@janouch.name> | 2018-09-08 16:49:21 +0200 | 
| commit | 33509dbeb0acd7abbbb9e8c434d0c3f0ce8a3230 (patch) | |
| tree | ce7d66adcb2e7fd3802a884b0fae618dfa1533a6 /nexgb/xproto | |
| parent | ad9c35a02f190ea5da59c9c4a3aeddcf7e8a5c1f (diff) | |
| download | haven-33509dbeb0acd7abbbb9e8c434d0c3f0ce8a3230.tar.gz haven-33509dbeb0acd7abbbb9e8c434d0c3f0ce8a3230.tar.xz haven-33509dbeb0acd7abbbb9e8c434d0c3f0ce8a3230.zip  | |
It appears that the "Str" type (which is built into the core X protocol)
doesn't specify any padding. So it has to be treated as a special case.
Close #12.
Diffstat (limited to 'nexgb/xproto')
| -rw-r--r-- | nexgb/xproto/xproto.go | 16 | 
1 files changed, 8 insertions, 8 deletions
diff --git a/nexgb/xproto/xproto.go b/nexgb/xproto/xproto.go index 5579ba9..36ab545 100644 --- a/nexgb/xproto/xproto.go +++ b/nexgb/xproto/xproto.go @@ -5404,7 +5404,7 @@ func SetupAuthenticateRead(buf []byte, v *SetupAuthenticate) int {  		byteString := make([]byte, (int(v.Length) * 4))  		copy(byteString[:(int(v.Length)*4)], buf[b:])  		v.Reason = string(byteString) -		b += xgb.Pad(int((int(v.Length) * 4))) +		b += int((int(v.Length) * 4))  	}  	return b @@ -5492,7 +5492,7 @@ func SetupFailedRead(buf []byte, v *SetupFailed) int {  		byteString := make([]byte, v.ReasonLen)  		copy(byteString[:v.ReasonLen], buf[b:])  		v.Reason = string(byteString) -		b += xgb.Pad(int(v.ReasonLen)) +		b += int(v.ReasonLen)  	}  	return b @@ -5647,7 +5647,7 @@ func SetupInfoRead(buf []byte, v *SetupInfo) int {  		byteString := make([]byte, v.VendorLen)  		copy(byteString[:v.VendorLen], buf[b:])  		v.Vendor = string(byteString) -		b += xgb.Pad(int(v.VendorLen)) +		b += int(v.VendorLen)  	}  	v.PixmapFormats = make([]Format, v.PixmapFormatsLen) @@ -5802,14 +5802,14 @@ func SetupRequestRead(buf []byte, v *SetupRequest) int {  		byteString := make([]byte, v.AuthorizationProtocolNameLen)  		copy(byteString[:v.AuthorizationProtocolNameLen], buf[b:])  		v.AuthorizationProtocolName = string(byteString) -		b += xgb.Pad(int(v.AuthorizationProtocolNameLen)) +		b += int(v.AuthorizationProtocolNameLen)  	}  	{  		byteString := make([]byte, v.AuthorizationProtocolDataLen)  		copy(byteString[:v.AuthorizationProtocolDataLen], buf[b:])  		v.AuthorizationProtocolData = string(byteString) -		b += xgb.Pad(int(v.AuthorizationProtocolDataLen)) +		b += int(v.AuthorizationProtocolDataLen)  	}  	return b @@ -5903,7 +5903,7 @@ func StrRead(buf []byte, v *Str) int {  		byteString := make([]byte, v.NameLen)  		copy(byteString[:v.NameLen], buf[b:])  		v.Name = string(byteString) -		b += xgb.Pad(int(v.NameLen)) +		b += int(v.NameLen)  	}  	return b @@ -9036,7 +9036,7 @@ func getAtomNameReply(buf []byte) *GetAtomNameReply {  		byteString := make([]byte, v.NameLen)  		copy(byteString[:v.NameLen], buf[b:])  		v.Name = string(byteString) -		b += xgb.Pad(int(v.NameLen)) +		b += int(v.NameLen)  	}  	return v @@ -11406,7 +11406,7 @@ func listFontsWithInfoReply(buf []byte) *ListFontsWithInfoReply {  		byteString := make([]byte, v.NameLen)  		copy(byteString[:v.NameLen], buf[b:])  		v.Name = string(byteString) -		b += xgb.Pad(int(v.NameLen)) +		b += int(v.NameLen)  	}  	return v  | 
