Comparing CodeEditApp:main...agentasticai:main · CodeEditApp/CodeEditSourceEditor
Commits on Jan 13, 2026
-
Fix integer underflow crash in findClosingPair
When visibleTextRange is not synchronized with the cursor position (e.g., during initial view load), the limit parameter could exceed the from parameter for reverse searches. This caused from - limit to underflow, creating an invalid NSRange with a huge length value. The fix adds guard statements to return nil early when the range parameters would create an invalid range, preventing the crash. Fixes crash: Range {133893, 18446744073709421883} out of bounds