aboutsummaryrefslogtreecommitdiff
path: root/nexgb/xgbgen/translation.go
diff options
context:
space:
mode:
Diffstat (limited to 'nexgb/xgbgen/translation.go')
-rw-r--r--nexgb/xgbgen/translation.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/nexgb/xgbgen/translation.go b/nexgb/xgbgen/translation.go
index 36daa8b..9c7603b 100644
--- a/nexgb/xgbgen/translation.go
+++ b/nexgb/xgbgen/translation.go
@@ -210,11 +210,13 @@ func (x *XMLRequest) Translate() *Request {
// computation of the 'odd_length' field. However, 'string_len' is not
// defined. Therefore, let's forcefully add it as a 'local field'.
// (i.e., a parameter in the caller but does not get send over the wire.)
- stringLenLocal := &LocalField{&SingleField{
- xmlName: "string_len",
- Type: newTranslation("CARD16"),
- }}
- r.Fields = append(r.Fields, stringLenLocal)
+ if x.Name == "QueryTextExtents" {
+ stringLenLocal := &LocalField{&SingleField{
+ xmlName: "string_len",
+ Type: newTranslation("CARD16"),
+ }}
+ r.Fields = append(r.Fields, stringLenLocal)
+ }
return r
}