mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-22 19:10:41 -10:00
SBCSCodePageEncoding: Don't call DecoderFallback.CreateFallbackBuffer until needed (dotnet/corefx#35199)
* Don't call DecoderFallback.CreateFallbackBuffer until needed * Use null instead of fallbackBuffer Commit migrated from https://github.com/dotnet/corefx/commit/5419ecd858d11f08938019ba49477039de93ec3f
This commit is contained in:
1 parent
85eb3a1397
commit
7581341da3
1 file changed
+1
-2
+1
-2
@@ -821,8 +821,7 @@ namespace System.Text
|
||||
byte[] byteBuffer = new byte[1];
|
||||
char* charEnd = chars + charCount;
|
||||
|
||||
DecoderFallbackBufferHelper fallbackHelper = new DecoderFallbackBufferHelper(
|
||||
decoder != null ? decoder.FallbackBuffer : DecoderFallback.CreateFallbackBuffer());
|
||||
DecoderFallbackBufferHelper fallbackHelper = new DecoderFallbackBufferHelper(null);
|
||||
|
||||
// Not quite so fast loop
|
||||
while (bytes < byteEnd)
|
||||
|
||||
Reference in new issue
Block a user