summaryrefslogtreecommitdiffstats
path: root/win/C#
diff options
context:
space:
mode:
Diffstat (limited to 'win/C#')
-rw-r--r--win/C#/Functions/Main.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs
index 4fc0496ef..11e6be932 100644
--- a/win/C#/Functions/Main.cs
+++ b/win/C#/Functions/Main.cs
@@ -808,9 +808,12 @@ namespace Handbrake.Functions
StringBuilder sb = new StringBuilder(input.Length);
foreach (string s in tokens)
{
- sb.Append(s[0].ToString().ToUpper());
- sb.Append(s.Substring(1).ToLower());
- sb.Append(" ");
+ if (!string.IsNullOrEmpty(s))
+ {
+ sb.Append(s[0].ToString().ToUpper());
+ sb.Append(s.Substring(1).ToLower());
+ sb.Append(" ");
+ }
}
return sb.ToString().Trim();