Skip to content

Commit

Permalink
client/core: fix OrderFilter offset length check
Browse files Browse the repository at this point in the history
  • Loading branch information
chappjc committed Dec 17, 2020
1 parent dba8b73 commit 2846814
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -2093,8 +2093,8 @@ func (c *Core) Logout() error {
func (c *Core) Orders(filter *OrderFilter) ([]*Order, error) {
var oid order.OrderID
if len(filter.Offset) > 0 {
if len(filter.Offset) != order.OrderIDSize*2 {
return nil, fmt.Errorf("invalid offset order ID length. wanted %d, got %d", order.OrderIDSize*2, len(filter.Offset))
if len(filter.Offset) != order.OrderIDSize {
return nil, fmt.Errorf("invalid offset order ID length. wanted %d, got %d", order.OrderIDSize, len(filter.Offset))
}
copy(oid[:], filter.Offset)
}
Expand Down

0 comments on commit 2846814

Please sign in to comment.