Skip to content

Commit

Permalink
Merge pull request #139 from WiRuc/WiRuc-patch-Issue#138
Browse files Browse the repository at this point in the history
Exception in the method SqlScriptExecutor.Log #138
  • Loading branch information
JakeGinnivan committed Sep 22, 2015
2 parents 1fea3f1 + 154e65a commit 6da3baf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DbUp/Support/SqlServer/SqlScriptExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public virtual void Log(IDataReader reader)
int totalLength = 0;
for (int i = 0; i < reader.FieldCount; i++)
{
int maxLength = lines.Max(l => (l[i] ?? "").Length) + 2;
int maxLength = (lines.Count == 0 ? 0 : lines.Max(l => (l[i] ?? "").Length)) + 2;
format += " {" + i + ", " + maxLength + "} |";
totalLength += (maxLength + 3);
}
Expand Down

0 comments on commit 6da3baf

Please sign in to comment.