A boolean value is actually stored as byte behind the scenes, so it can have a value range from 0..255, not just 0/1. Stop converting it to 0/1 when loading it since it can lead to comparison issues.
}
/* printf ("TODAT0 %p\n", data); */
switch (type->type) {
+ case MONO_TYPE_BOOLEAN:
case MONO_TYPE_I1:
case MONO_TYPE_U1: {
guint8 *p = (guint8*)data;
*p = GINT32_TO_UINT8 (val->data.i);
return MINT_STACK_SLOT_SIZE;
}
- case MONO_TYPE_BOOLEAN: {
- guint8 *p = (guint8*)data;
- *p = (val->data.i != 0);
- return MINT_STACK_SLOT_SIZE;
- }
case MONO_TYPE_I2:
case MONO_TYPE_U2:
case MONO_TYPE_CHAR: {