Skip to content

Commit

Permalink
fix the problem running on x32 bit system
Browse files Browse the repository at this point in the history
  • Loading branch information
sijms committed Mar 25, 2021
1 parent 3cd8d7e commit 15015e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions advanced_nego/advanced_nego.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func NewAdvNego(connOption *network.ConnectionOption) (*AdvNego, error) {
return output, nil
}
func (nego *AdvNego) readHeader(session *network.Session) ([]int, error) {
num, err := session.GetInt(4, false, true)
num, err := session.GetInt64(4, false, true)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -117,7 +117,7 @@ func (nego *AdvNego) Write(session *network.Session) error {
size = size + 8 + nego.serviceList[i].getServiceDataLength()
}
size += 13
session.PutInt(0xDEADBEEF, 4, true, false)
session.PutInt(uint64(0xDEADBEEF), 4, true, false)
session.PutInt(size, 2, true, false)
session.PutInt(nego.serviceList[1].getVersion(), 4, true, false)
session.PutInt(4, 2, true, false)
Expand Down
4 changes: 2 additions & 2 deletions advanced_nego/supervisor_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (serv *supervisorService) readServiceData(session *network.Session, subPack
if err != nil {
return err
}
num1, err := session.GetInt(4, false, true)
num1, err := session.GetInt64(4, false, true)
if err != nil {
return err
}
Expand Down Expand Up @@ -88,7 +88,7 @@ func (serv *supervisorService) writeServiceData(session *network.Session) error
if err != nil {
return err
}
session.PutInt(0xDEADBEEF, 4, true, false)
session.PutInt(uint64(0xDEADBEEF), 4, true, false)
session.PutInt(3, 2, true, false)
session.PutInt(len(serv.servArray), 4, true, false)
for i := 0; i < len(serv.servArray); i++ {
Expand Down

0 comments on commit 15015e6

Please sign in to comment.