1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0025740: VrmlData_Scene::WriteArrIndex() writes extra point indices.

Reason of bug: at the end of writing indices the "buf" was written double times.
Fix: At the end of operation skip one WriteLine.

Test case for issue CR25740
This commit is contained in:
akz
2015-02-05 15:22:13 +03:00
committed by bugmaster
parent f5fa6b335c
commit 0bb1f1133c
2 changed files with 45 additions and 0 deletions

View File

@@ -898,6 +898,8 @@ VrmlData_ErrorStatus VrmlData_Scene::WriteArrIndex
char * ptr = &buf[0];
for (Standard_Integer i = 0; i < nVal; i++) {
Sprintf (ptr, "%d,", arrVal[i]);
if (i == nVal - 1)
break;
ptr = strchr (ptr, ',') + 1;
if ((ptr - &buf[0]) > (ptrdiff_t)aLineLimit) {
WriteLine(buf);