Feature#name could be anything

This commit is contained in:
0x1eef 2024-02-29 23:10:28 -03:00
parent 507ef2aa4b
commit 9f263d79f2

View file

@ -31,13 +31,16 @@ feature_set(VALUE self, VALUE path, VALUE state)
{
int r;
char *cpath;
VALUE name;
Check_Type(path, T_STRING);
Check_Type(state, T_FIXNUM);
cpath = RSTRING_PTR(path);
name = rb_funcall(self, rb_intern("name"), 0);
Check_Type(name, T_STRING);
r = hbsdcontrol_set_feature_state(
cpath,
RSTRING_PTR(rb_funcall(self, rb_intern("name"), 0)),
RSTRING_PTR(name),
NUM2INT(state)
);
if (r == 0) {