]> OCCT Git - occt-copy.git/commitdiff
0029859: Coding - GCC compiler warning -Warray-bounds in IntPatch_InterferencePolyhed...
authorabv <abv@opencascade.com>
Tue, 12 Jun 2018 19:18:34 +0000 (22:18 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 14 Jun 2018 11:03:14 +0000 (14:03 +0300)
Code is corrected to avoid copying uninitialized element of the array

src/IntPatch/IntPatch_InterferencePolyhedron.cxx

index aad11b92455cc85b2257a4488c07caaa06c9d208..9f920f600e2a56d41b584e2e2a6abd85ef31a2bb 100644 (file)
@@ -901,11 +901,11 @@ Standard_Boolean IntPatch_InterferencePolyhedron::TangentZoneValue
        if (nob<0) break;
       }
       if (nob>=0) {
-       while (nob<nbNoInserted) {
+       nbNoInserted--;
+       while (nob < nbNoInserted) {
          piToInsert[nob]=piToInsert[nob+1];
          nob++;
        }
-       nbNoInserted--;
        nob=nbNoInserted-1;
       }
     }