Parcourir la source

codec: fix 32-bit build for simple codec.

Fixes #3
Ugorji Nwoke il y a 12 ans
Parent
commit
71c2886f5a
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      codec/simple.go

+ 1 - 1
codec/simple.go

@@ -98,7 +98,7 @@ func (e *simpleEncDriver) encLen(bd byte, length int) {
 	case length <= math.MaxUint16:
 		e.w.writen1(bd + 2)
 		e.w.writeUint16(uint16(length))
-	case length <= math.MaxUint32:
+	case int64(length) <= math.MaxUint32:
 		e.w.writen1(bd + 3)
 		e.w.writeUint32(uint32(length))
 	default: