Skip to content

Commit

Permalink
Merge pull request #1061 from MaxFromDoqpal/Bugfix-Issue1060-Unknown-…
Browse files Browse the repository at this point in the history
…variable-in-preprocessor-statement

Fix for issue #1060 - Unknown variable in preprocessor statement
  • Loading branch information
praeclarum committed Sep 2, 2021
2 parents 758ad7a + 5940dc7 commit 4479f31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SQLite.cs
Expand Up @@ -2612,8 +2612,8 @@ public Column (MemberInfo member, CreateFlags createFlags = CreateFlags.None)

var colAttr = member.CustomAttributes.FirstOrDefault (x => x.AttributeType == typeof (ColumnAttribute));
#if ENABLE_IL2CPP
var ca = prop.GetCustomAttribute(typeof(ColumnAttribute)) as ColumnAttribute;
Name = ca == null ? prop.Name : ca.Name;
var ca = member.GetCustomAttribute(typeof(ColumnAttribute)) as ColumnAttribute;
Name = ca == null ? member.Name : ca.Name;
#else
Name = (colAttr != null && colAttr.ConstructorArguments.Count > 0) ?
colAttr.ConstructorArguments[0].Value?.ToString () :
Expand Down

0 comments on commit 4479f31

Please sign in to comment.