Opennurbs setUserStrings bug

Hello, i would like to share somethings which looks like a bug in opennurbs.

I was using SetUserStrings on ON_3dmObjectAttributes, and sometime it was failing.

After investigation this append when my ON_UserString array contain only 1 element, which isn’t already in the attribute.
The bug is in opennurbs_userdata.cpp ligne 916, in the case where we have only 1 element to add/replace. We parse already existing key for replacement but if we didn’t found existing key we didn’t add anythings and return 0.

Hi @guillaume2,

Yes, this is a known issue.

– Dale