Skip to content

Fix *it access beyond end - #7

Merged
sadhbh-c0d3 merged 1 commit into
mainfrom
fix/empty-side-matching
Jul 9, 2026
Merged

Fix *it access beyond end#7
sadhbh-c0d3 merged 1 commit into
mainfrom
fix/empty-side-matching

Conversation

@sadhbh-c0d3

@sadhbh-c0d3 sadhbh-c0d3 commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Reported Issue: #6

Problems found:

  1. price_compare(*it, order) would access *it pointing beyond end if levels were empty.
  2. price_compare(*it, order) excluded all levels with price below or equal order price.

Remedies:

  1. Remove price_compare(*it, order) check before matching loop.

@sadhbh-c0d3
sadhbh-c0d3 merged commit 0c45ed2 into main Jul 9, 2026
1 check passed
@sadhbh-c0d3
sadhbh-c0d3 deleted the fix/empty-side-matching branch July 9, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report] match_order: an order at the exact touch price never crosses, and the opposite-side guard dereferences an empty book

1 participant