Skip to content

Commit 754c321

Browse files
🎨
1 parent 85d6ec6 commit 754c321

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

Lite3DotNet.SystemTextJson/Lite3JsonDecoder.cs

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -231,19 +231,16 @@ private static (byte[] Buffer, int Position) DecodeImpl(
231231
{
232232
var jsonReader = new Utf8JsonReader(utf8Json, isFinalBlock: true, new JsonReaderState());
233233

234-
do
235-
{
236-
var status = DecodeCore(arrayPool,
237-
ref frames,
238-
ref buffer,
239-
growBuffer,
240-
ref isRentedBuffer,
241-
ref position,
242-
ref jsonReader);
234+
var status = DecodeCore(arrayPool,
235+
ref frames,
236+
ref buffer,
237+
growBuffer,
238+
ref isRentedBuffer,
239+
ref position,
240+
ref jsonReader);
243241

244-
if (status < 0)
245-
throw status.AsException();
246-
} while (!frames.IsEmpty());
242+
if (status < 0)
243+
throw status.AsException();
247244

248245
if (jsonReader.BytesConsumed != utf8Json.Length)
249246
throw new JsonException("Trailing data after JSON payload.");

0 commit comments

Comments
 (0)