Commits

sherwinyu  committed 807cc58

fixed compile time error (unsigned ints)

  • Participants
  • Parent commits ec22e39

Comments (0)

Files changed (1)

File server/network.go

 		var length int32 = int32(len(msg.Payload)) // len(string) returns length in bytes... ha ha! screw you unicode!
 		// TODO(syu) NO IDEA IF THIS WORKS. TEST ME. I HOPE IT WORKSK
 		bytearr := [4]byte{}
-		bytearr[0] = byte((length & 0xff000000) >> 24)
+		bytearr[0] = byte((uint32(length) & 0xff000000) >> 24)
 		bytearr[1] = byte((length & 0x00ff0000) >> 16)
 		bytearr[2] = byte((length & 0x0000ff00) >> 8)
 		bytearr[3] = byte((length & 0x000000ff) >> 0)