@@ -257,7 +257,7 @@ private protected unsafe int GetByteCountWithFallback(char* pCharsOriginal, int
257
257
private unsafe int GetByteCountWithFallback ( char * pOriginalChars , int originalCharCount , int charsConsumedSoFar , EncoderNLS encoder )
258
258
{
259
259
Debug . Assert ( encoder != null , "This code path should only be called from EncoderNLS." ) ;
260
- Debug . Assert ( 0 <= charsConsumedSoFar && charsConsumedSoFar < originalCharCount , "Caller should've checked this condition." ) ;
260
+ Debug . Assert ( 0 <= charsConsumedSoFar && charsConsumedSoFar <= originalCharCount , "Caller should've checked this condition." ) ;
261
261
262
262
// First, try draining any data that already exists on the encoder instance. If we can't complete
263
263
// that operation, there's no point to continuing down to the main workhorse methods.
@@ -523,7 +523,7 @@ private protected unsafe int GetBytesWithFallback(char* pOriginalChars, int orig
523
523
private unsafe int GetBytesWithFallback ( char * pOriginalChars , int originalCharCount , byte * pOriginalBytes , int originalByteCount , int charsConsumedSoFar , int bytesWrittenSoFar , EncoderNLS encoder )
524
524
{
525
525
Debug . Assert ( encoder != null , "This code path should only be called from EncoderNLS." ) ;
526
- Debug . Assert ( 0 <= charsConsumedSoFar && charsConsumedSoFar < originalCharCount , "Caller should've checked this condition." ) ;
526
+ Debug . Assert ( 0 <= charsConsumedSoFar && charsConsumedSoFar <= originalCharCount , "Caller should've checked this condition." ) ;
527
527
Debug . Assert ( 0 <= bytesWrittenSoFar && bytesWrittenSoFar <= originalByteCount , "Caller should've checked this condition." ) ;
528
528
529
529
// First, try draining any data that already exists on the encoder instance. If we can't complete
@@ -843,7 +843,7 @@ private protected unsafe int GetCharCountWithFallback(byte* pBytesOriginal, int
843
843
private unsafe int GetCharCountWithFallback ( byte * pOriginalBytes , int originalByteCount , int bytesConsumedSoFar , DecoderNLS decoder )
844
844
{
845
845
Debug . Assert ( decoder != null , "This code path should only be called from DecoderNLS." ) ;
846
- Debug . Assert ( 0 <= bytesConsumedSoFar && bytesConsumedSoFar < originalByteCount , "Caller should've checked this condition." ) ;
846
+ Debug . Assert ( 0 <= bytesConsumedSoFar && bytesConsumedSoFar <= originalByteCount , "Caller should've checked this condition." ) ;
847
847
848
848
// First, try draining any data that already exists on the decoder instance. If we can't complete
849
849
// that operation, there's no point to continuing down to the main workhorse methods.
@@ -1111,7 +1111,7 @@ private protected unsafe int GetCharsWithFallback(byte* pOriginalBytes, int orig
1111
1111
private protected unsafe int GetCharsWithFallback ( byte * pOriginalBytes , int originalByteCount , char * pOriginalChars , int originalCharCount , int bytesConsumedSoFar , int charsWrittenSoFar , DecoderNLS decoder )
1112
1112
{
1113
1113
Debug . Assert ( decoder != null , "This code path should only be called from DecoderNLS." ) ;
1114
- Debug . Assert ( 0 <= bytesConsumedSoFar && bytesConsumedSoFar < originalByteCount , "Caller should've checked this condition." ) ;
1114
+ Debug . Assert ( 0 <= bytesConsumedSoFar && bytesConsumedSoFar <= originalByteCount , "Caller should've checked this condition." ) ;
1115
1115
Debug . Assert ( 0 <= charsWrittenSoFar && charsWrittenSoFar <= originalCharCount , "Caller should've checked this condition." ) ;
1116
1116
1117
1117
// First, try draining any data that already exists on the encoder instance. If we can't complete
0 commit comments