Browse Source

Fix a possible overflown stack when ignoring

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/1265/head
Dimitar Dobrev 6 years ago
parent
commit
67b3058d39
  1. 15
      src/Generator/Passes/CheckIgnoredDecls.cs

15
src/Generator/Passes/CheckIgnoredDecls.cs

@ -61,14 +61,11 @@ namespace CppSharp.Passes
Declaration decl = null; Declaration decl = null;
if (specialization.Arguments.Any(a => if (specialization.Arguments.Any(a =>
a.Type.Type?.TryGetDeclaration(out decl) == true)) a.Type.Type?.TryGetDeclaration(out decl) == true) &&
decl.Ignore)
{ {
decl.Visit(this); specialization.ExplicitlyIgnore();
if (decl.Ignore) return false;
{
specialization.ExplicitlyIgnore();
return false;
}
} }
return true; return true;
@ -523,10 +520,6 @@ namespace CppSharp.Passes
return typeMap.IsIgnored; return typeMap.IsIgnored;
} }
if (decl.Ignore)
return true;
decl.Visit(this);
return decl.Ignore; return decl.Ignore;
} }

Loading…
Cancel
Save