Skip to content

Commit

Permalink
Fix bug in Get32le for CyberBridge
Browse files Browse the repository at this point in the history
  • Loading branch information
Qiang Lu committed Mar 13, 2019
1 parent 59be90f commit 54b60a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Assets/Scripts/CyberBridge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ void EndRead(IAsyncResult ar)

int Get32le(int offset)
{
return Buffer[offset + 0] | (Buffer[2] << 8) | (Buffer[3] << 16) | (Buffer[4] << 24);
return Buffer[offset + 0] | (Buffer[offset + 1] << 8) | (Buffer[offset + 2] << 16) | (Buffer[offset + 3] << 24);
}

public override void Update()
Expand Down Expand Up @@ -365,4 +365,4 @@ class MessageHelper<T>
typeof(T).GetProperty("Parser", BindingFlags.Static | BindingFlags.Public).GetValue(null) as MessageParser;
}
}
}
}

0 comments on commit 54b60a9

Please sign in to comment.