Browse Source

Fixed crashes when printing messages containing braces.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/849/head
Dimitar Dobrev 9 years ago
parent
commit
a9ee1fda5e
  1. 6
      src/Core/Diagnostics.cs

6
src/Core/Diagnostics.cs

@ -61,7 +61,7 @@ namespace CppSharp @@ -61,7 +61,7 @@ namespace CppSharp
var diagInfo = new DiagnosticInfo
{
Kind = DiagnosticKind.Debug,
Message = string.Format(msg, args)
Message = args.Any() ? string.Format(msg, args) : msg
};
Implementation.Emit(diagInfo);
@ -72,7 +72,7 @@ namespace CppSharp @@ -72,7 +72,7 @@ namespace CppSharp
var diagInfo = new DiagnosticInfo
{
Kind = DiagnosticKind.Message,
Message = string.Format(msg, args)
Message = args.Any() ? string.Format(msg, args) : msg
};
Implementation.Emit(diagInfo);
@ -83,7 +83,7 @@ namespace CppSharp @@ -83,7 +83,7 @@ namespace CppSharp
var diagInfo = new DiagnosticInfo
{
Kind = DiagnosticKind.Warning,
Message = string.Format(msg, args)
Message = args.Any() ? string.Format(msg, args) : msg
};
Implementation.Emit(diagInfo);

Loading…
Cancel
Save