Skip to content

Commit a13d012

Browse files
committed
Fixed constant 2147483648 overflows int
1 parent 18cb585 commit a13d012

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rpc/socket_common.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* *
1313
* hprose socket common for Go. *
1414
* *
15-
* LastModified: Nov 1, 2016 *
15+
* LastModified: Nov 20, 2016 *
1616
* Author: Ma Bingyao <[email protected]> *
1717
* *
1818
\**********************************************************/
@@ -59,7 +59,7 @@ func sendData(writer io.Writer, data packet) (err error) {
5959
}
6060
buf := hio.AcquireBytes(len)
6161
if data.fullDuplex {
62-
util.FromUint32(buf, uint32(n|0x80000000))
62+
util.FromUint32(buf, uint32(n)|0x80000000)
6363
buf[4] = data.id[0]
6464
buf[5] = data.id[1]
6565
buf[6] = data.id[2]

0 commit comments

Comments
 (0)