Skip to content

Commit

Permalink
Reordered statements
Browse files Browse the repository at this point in the history
  • Loading branch information
redssu committed Jun 24, 2023
1 parent 93f482e commit ff7706d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Drivers/DatDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public override void Pack(FileSystemInfo input, string output, bool deleteOrigin

if (currentChar == '"')
{
if (line[charIndex - 1] == ',' || charIndex == 0)
if (charIndex == 0 || line[charIndex - 1] == ',')
{
isEnclosedInQuotes = true;
continue;
Expand Down Expand Up @@ -262,6 +262,16 @@ public override void Pack(FileSystemInfo input, string output, bool deleteOrigin
rowData.RemoveAt(0);
datFile.Data.AddRange(rowData);

foreach (var row in rowData)
{
foreach (var column in row)
{
Console.Write($"\"{column}\",");
}

Console.Write('\n');
}

var columnDefinitions = new List<(string Name, string Type, ushort Count)>();

foreach (var header in headers)
Expand Down

0 comments on commit ff7706d

Please sign in to comment.