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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user