Skip to content

Commit ce4d015

Browse files
committed
(just to prove that DapperLib#552 still happens even if the only values seen are 0 and 1)
1 parent 2b9a3d4 commit ce4d015

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Dapper.Tests/Tests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3074,12 +3074,12 @@ public void Issue552_SignedUnsignedBooleans()
30743074
truncate table bar;
30753075
insert bar (id, bool_val) values (1, null);
30763076
insert bar (id, bool_val) values (2, 0);
3077-
insert bar (id, bool_val) values (3, 2);
3077+
insert bar (id, bool_val) values (3, 1);
30783078
insert bar (id, bool_val) values (4, null);
3079-
insert bar (id, bool_val) values (5, 3);
3079+
insert bar (id, bool_val) values (5, 1);
30803080
insert bar (id, bool_val) values (6, 0);
30813081
insert bar (id, bool_val) values (7, null);
3082-
insert bar (id, bool_val) values (8, 5);");
3082+
insert bar (id, bool_val) values (8, 1);");
30833083

30843084
var rows = conn.Query<MySqlHasBool>("select * from bar;").ToDictionary(x => x.Id);
30853085

Dapper/SqlMapper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3097,7 +3097,7 @@ private static Func<IDataReader, object> GetTypeDeserializerImpl(
30973097
}
30983098
else
30993099
{
3100-
il.Emit(OpCodes.Unbox_Any, unboxType); // stack is now [target][target][typed-value]
3100+
il.Emit(OpCodes.Unbox_Any, unboxType); // stack is now [target][target][typed-value]
31013101
}
31023102
}
31033103
else

0 commit comments

Comments
 (0)