diff options
Diffstat (limited to 'platform/windows/gsview/mudocument.cs')
-rw-r--r-- | platform/windows/gsview/mudocument.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/platform/windows/gsview/mudocument.cs b/platform/windows/gsview/mudocument.cs index 291a424e..3087d3d0 100644 --- a/platform/windows/gsview/mudocument.cs +++ b/platform/windows/gsview/mudocument.cs @@ -1375,7 +1375,15 @@ namespace gsview textchars.Height = height; textchars.Scale = 1.0; textchars.Color = linecolor; - textchars.character = System.Convert.ToChar(character).ToString(); + try + { + textchars.character = System.Convert.ToChar(character).ToString(); + } + catch (OverflowException) + { + textchars.character = " "; /* Something went wrong here. Use blank space */ + Console.WriteLine("{0} is outside the range of the Char data type.", character); + } blocks[kk].TextLines[jj].TextCharacters.Add(textchars); } } |