diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2024-11-09 17:06:46 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2024-11-09 17:06:46 +0100 |
commit | 492815c8fc38ad6e333b2f1c5094a329e3076155 (patch) | |
tree | f4e72c9a82997c5cc2fa5fd8c07ff07c4eb1b00c | |
parent | aacf1b1d47824de2c924874e3d6cdad1d8b5ba2b (diff) | |
download | liberty-origin/master.tar.gz liberty-origin/master.tar.xz liberty-origin/master.zip |
lxdrgen-go: fix compatibility with 32-bit targetsHEADorigin/mastermaster
-rw-r--r-- | tools/lxdrgen-go.awk | 2 |
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)))" |