防止Tables为空时索引下标越界 (#30)

This commit is contained in:
Yezi 2023-06-07 10:16:26 +08:00 committed by GitHub
parent 133fef14d7
commit 549055a0e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,6 +48,8 @@ namespace Milimoe.FunGame.Core.Library.Common.JsonConverter
{
writer.WriteStartObject();
if (value.Tables.Count == 0) value.Tables.Add(new DataTable());
writer.WriteString("TableName", value.Tables[0].TableName);
writer.WritePropertyName("Columns");