Skip to content

Comments

Fix off-by-one in InsertAndShift resize condition (#2291)#2292

Open
swmal wants to merge 1 commit intodevelop8from
bug/i2291
Open

Fix off-by-one in InsertAndShift resize condition (#2291)#2292
swmal wants to merge 1 commit intodevelop8from
bug/i2291

Conversation

@swmal
Copy link
Contributor

@swmal swmal commented Feb 18, 2026

Fixed a bug in ChangeableDictionary.InsertAndShift where the array resize condition was checking pos + 1 >= Length - 1 instead of _count >= Length - 1. This caused an ArgumentException when calling InsertColumn on xlsx files where the number of defined columns was at the array boundary.

This PR also includes a unit test that replicated the issue and verifies the fix.

@swmal swmal self-assigned this Feb 18, 2026
@swmal swmal added the bug Something isn't working label Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant