Permalink
Browse files

- Fixed: negative parameter in stringbuilder

  • Loading branch information...
1 parent fc8dbd4 commit 51a96f44ac5244fae6951573932c4747e5690054 graveen committed Dec 19, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 DOLConfig/ServerProperties.cs
@@ -125,7 +125,9 @@ private string FormatNodeText(int level, string k, string v)
sb.Append(k);
sb.Append(Cte_sep);
//System.Diagnostics.Debug.Print("key = " + k + " - level = " + level + " - length = " + k.Length);
- sb.Append(' ', 42 - k.Length - level*3);
+ int pos = 44 - k.Length - level*3;
+ if (pos < 0) pos = 0;
+ sb.Append(' ', pos);
sb.Append(v);
return sb.ToString();
}

0 comments on commit 51a96f4

Please sign in to comment.