Skip to content

Commit 951b03c

Browse files
committed
Minor fix
1 parent b5301d2 commit 951b03c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/runtime/Types/MetaType.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,8 @@ public static int mp_length(BorrowedReference tp)
392392
/// </summary>
393393
public static int nb_bool(BorrowedReference tp)
394394
{
395-
return 1;
395+
var cb = GetManagedObject(tp) as ClassBase;
396+
return cb == null || !cb.type.Valid ? 0 : 1;
396397
}
397398

398399
/// <summary>

0 commit comments

Comments
 (0)