Browse Source

codec: fix 32-bit build for simple codec.

Fixes #3
Ugorji Nwoke 12 years ago
parent
commit
71c2886f5a
1 changed files with 1 additions and 1 deletions
  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:
 	case length <= math.MaxUint16:
 		e.w.writen1(bd + 2)
 		e.w.writen1(bd + 2)
 		e.w.writeUint16(uint16(length))
 		e.w.writeUint16(uint16(length))
-	case length <= math.MaxUint32:
+	case int64(length) <= math.MaxUint32:
 		e.w.writen1(bd + 3)
 		e.w.writen1(bd + 3)
 		e.w.writeUint32(uint32(length))
 		e.w.writeUint32(uint32(length))
 	default:
 	default: