Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

object_attr_setobj() doesn't return error when used on unsettable attributes #21

Open
diablodale opened this issue Mar 11, 2016 · 0 comments

Comments

@diablodale
Copy link
Contributor

In the following code

if (MAX_ERR_NONE == object_attr_setobj(myjbox, _sym_object, (t_object *)0x123123llu))
{
    cpost("object value set");
    t_object *objectcheck = jbox_get_object(myjbox);
    cpost("objectcheck=%Ix", objectcheck);
}

The output will be the unexpected

object value set
objectcheck=18180d20     <-- this can vary, the good thing is that it is not 0x123123

Expected is no output at all.
Since the attribute "object" is an unsettable attribute, then an error should be returned causing the if statement to skip output. Instead, object_attr_setobj() silently fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant