|
|
@@ -594,8 +594,8 @@ namespace System
|
|
|
|
|
|
public bool EndsWith(char value)
|
|
|
{
|
|
|
- int thisLen = Length;
|
|
|
- return thisLen != 0 && this[thisLen - 1] == value;
|
|
|
+ int lastPos = Length - 1;
|
|
|
+ return ((uint)lastPos < (uint)Length) && this[lastPos] == value;
|
|
|
}
|
|
|
|
|
|
// Determines whether two strings match.
|