]> OCCT Git - occt.git/commit
Modeling - Fix array indexing bug in IntAna_IntQuadQuad::NextCurve method (#703)
authorPasukhin Dmitry <dpasukhi@opencascade.com>
Sat, 6 Sep 2025 12:36:48 +0000 (13:36 +0100)
committerdpasukhi <dpasukhi@opencascade.com>
Sat, 6 Sep 2025 20:18:29 +0000 (21:18 +0100)
commitca3ee54adf5d904823efcbf111a38363d5e6ffbe
treef82f0960eb0baef0dc9a997f4befddeaa3577c6c
parent071c84a812bfb137ddb52ff213de37c19c61d869
Modeling - Fix array indexing bug in IntAna_IntQuadQuad::NextCurve method (#703)

Fixed a critical indexing bug in IntAna_IntQuadQuad::NextCurve where the
  method incorrectly used nextcurve[I] instead of nextcurve[I-1] for
  determining the theOpposite parameter.
This mismatch between 1-indexed API
  parameters and 0-indexed array access could lead to out-of-bounds memory
  access and incorrect curve connectivity determination.

Changes:
  - Fix IntAna_IntQuadQuad::NextCurve to use consistent I-1 indexing for both
   condition check and return value
  - Add comprehensive GTests covering NextCurve functionality, edge cases,
  and performance
  - Ensure proper error handling for invalid curve indices
src/IntAna/IntAna_IntQuadQuad.cxx