summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-struct/src/struct.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-11-03 09:35:55 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-11-03 09:35:55 +0900
commit12e38597c84f12e1064119d6b929c193eb1805e9 (patch)
tree1978f8c0e2052cee763c1bf12d80873d44295611 /mrbgems/mruby-struct/src/struct.c
parentd489b41c31361844ee4715c1aac54f3f0b353995 (diff)
downloadmruby-12e38597c84f12e1064119d6b929c193eb1805e9.tar.gz
mruby-12e38597c84f12e1064119d6b929c193eb1805e9.zip
Always check division-by-zero to avoid undefined behavior; fix #3816
Also removed the code to normalize NaN value for `MRB_NAN_BOXING`. Tha code was added to fix #1712 but no longer required after 249f05e7d.
Diffstat (limited to 'mrbgems/mruby-struct/src/struct.c')
-rw-r--r--mrbgems/mruby-struct/src/struct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-struct/src/struct.c b/mrbgems/mruby-struct/src/struct.c
index 019f99f22..1d2e62583 100644
--- a/mrbgems/mruby-struct/src/struct.c
+++ b/mrbgems/mruby-struct/src/struct.c
@@ -200,7 +200,7 @@ make_struct_define_accessors(mrb_state *mrb, mrb_value members, struct RClass *c
}
static mrb_value
-make_struct(mrb_state *mrb, mrb_value name, mrb_value members, struct RClass * klass)
+make_struct(mrb_state *mrb, mrb_value name, mrb_value members, struct RClass *klass)
{
mrb_value nstr;
mrb_sym id;