1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-08 14:17:06 +03:00

0030536: Foundation Classes - TCollection_ExtendedString::StartsWith() and EndsWith() have a mistake

Draw-commands StartsWith and EndsWith are renamed to QAStartsWith and QAEndsWith.
The test script bug30536 was corrected.
This commit is contained in:
vro
2019-03-18 10:16:40 +03:00
committed by apn
parent 404504b234
commit 43c8661e5e
3 changed files with 73 additions and 2 deletions

View File

@@ -539,7 +539,7 @@ Standard_Boolean TCollection_ExtendedString::StartsWith (const TCollection_Exten
}
return mylength >= theStartString.mylength
&& memcmp (theStartString.mystring, mystring, theStartString.mylength) == 0;
&& memcmp (theStartString.mystring, mystring, theStartString.mylength * sizeof(Standard_ExtCharacter)) == 0;
}
// ----------------------------------------------------------------------------
@@ -553,7 +553,7 @@ Standard_Boolean TCollection_ExtendedString::EndsWith (const TCollection_Extende
}
return mylength >= theEndString.mylength
&& memcmp (theEndString.mystring, mystring + mylength - theEndString.mylength, theEndString.mylength) == 0;
&& memcmp (theEndString.mystring, mystring + mylength - theEndString.mylength, theEndString.mylength * sizeof(Standard_ExtCharacter)) == 0;
}
// ----------------------------------------------------------------------------