Skip to content
Permalink
Browse files
fix SEGV by *correctly* getting the address of the data member
  • Loading branch information
chuckremes committed Oct 1, 2015
1 parent 211f33b commit 9581c69322deff4f78fccb6b9643beb12ba5bcbc
Showing 1 changed file with 2 additions and 11 deletions.
@@ -1560,20 +1560,11 @@ namespace rubinius {
return cFalse;
}
}

#define READ(type, ptr) (*((type*)(ptr)))

Object* FDSet::to_set(STATE) {
Object* ret;

void *lptr = READ(void*, descriptor_set);
if(!lptr) {
ret = cNil;
} else {
ret = Pointer::create(state, lptr);
}
void *ptr = (void*)&descriptor_set;

return ret;
return Pointer::create(state, ptr);
}

}; // ends namespace rubinius

0 comments on commit 9581c69

Please sign in to comment.