Ignore empty property names during nwdbm cleanup

This commit is contained in:
Mario Fetka
2026-04-20 23:39:42 +02:00
parent ae20893723
commit 5a2fbb0a9d

View File

@@ -375,7 +375,9 @@ static int loc_delete_property(uint32 obj_id,
if (p->obj_id == obj_id) {
data = fetch(key);
p = (NETPROP*)data.dptr;
if (p != NULL && (!prop_name || !*prop_name || name_match(p->name, prop_name))){
if (p != NULL && p->name[0] == '\0') {
XDPRINTF((1,0, "ignoring empty property name for obj_id=0x%x, id=%d", obj_id, (int)p->id));
} else if (p != NULL && (!prop_name || !*prop_name || name_match(p->name, prop_name))){
XDPRINTF((2,0, "found prop: %s, id=%d for deleting", p->name, (int)p->id));
if (ever || !b_acc(obj_id, p->security, 0x13)) {
if ((int)(p->id) > result) result = (int)(p->id);