Skip to content

Commit

Permalink
Fix some really stupid mistakes in 61c2b84 that cause bad cname gener…
Browse files Browse the repository at this point in the history
…ation Fixes #58
  • Loading branch information
robincornelius committed Feb 6, 2017
1 parent d300dd9 commit e0d605a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions libEDSsharp/CanOpenNodeExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ public static string GetValue()
return method.Invoke(null, null) as string;
}

string make_cname(string name)
protected string make_cname(string name)
{
if (name == null)
return null;
Expand All @@ -940,16 +940,19 @@ string make_cname(string name)
}
else
{
output += output.ToUpper();
output += s;
}

if(output.Length>0)
lastchar = output.Last();

}

if (output.Length > 1 && Char.IsLower(output[1]))
output = Char.ToLower(output[0]) + output.Substring(1);
if (output.Length > 1)
{
if (Char.IsLower(output[1]))
output = Char.ToLower(output[0]) + output.Substring(1);
}
else
output = output.ToLower(); //single character

Expand Down

0 comments on commit e0d605a

Please sign in to comment.