mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
fixed NaN boxing compilation
Use MRB_SET_VALUE instead of directly accessing members of mrb_value which are different if NaN boxing is enabled.
This commit is contained in:
@@ -280,14 +280,7 @@ mrb_bool_value(mrb_bool boolean)
|
||||
{
|
||||
mrb_value v;
|
||||
|
||||
v.value.i = 1;
|
||||
if (boolean) {
|
||||
v.tt = MRB_TT_TRUE;
|
||||
}
|
||||
else {
|
||||
v.tt = MRB_TT_FALSE;
|
||||
}
|
||||
|
||||
MRB_SET_VALUE(v, boolean ? MRB_TT_TRUE : MRB_TT_FALSE, value.i, 1);
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user