aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/lxdrgen-go.awk2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lxdrgen-go.awk b/tools/lxdrgen-go.awk
index ac6cb8b..e5fb35e 100644
--- a/tools/lxdrgen-go.awk
+++ b/tools/lxdrgen-go.awk
@@ -145,7 +145,7 @@ function codegen_begin( funcname) {
print "// " funcname " tries to serialize a string value,"
print "// appending it to the end of a byte stream."
print "func " funcname "(data []byte, s string) ([]byte, bool) {"
- print "\tif len(s) > math.MaxUint32 {"
+ print "\tif int64(len(s)) > math.MaxUint32 {"
print "\t\treturn nil, false"
print "\t}"
print "\tdata = binary.BigEndian.AppendUint32(data, uint32(len(s)))"