tag_get_handle for same tag and same default value returns MB_ALREADY_ALLOCATED when it shouldn't
Issue #131
resolved
When you attempt to call tag_get_handle with the same tag properties and the same default value, and do NOT pass the MB_TAG_EXCL option, you should get the same tag handle back and MB_SUCCESS. However, the code currently returns MB_ALREADY_ALLOCATED. The coding error is in TagInfo::equals_default_value:
return !memcmp( &data, get_default_value(), get_default_value_size() );
data is a void*, and points to the passed-in default value, so it should be passed directly to memcmp (w/o the &). If you do that, the attached code works.
Comments (3)
-
reporter -
reporter Yes, the problem is with my local version. Never mind :).
-
reporter - changed status to resolved
Not an issue.
- Log in to comment
Hold off on checking this out, the problem may be with my local version…