make sfStateCount absent when it is 0

This commit is contained in:
Richard Holland
2022-08-30 09:32:10 +00:00
parent d81cc2104b
commit ce09f9a4c6

View File

@@ -869,7 +869,10 @@ SetHook::destroyNamespace(
return tefBAD_LEDGER;
}
sleAccount->setFieldU32(sfHookStateCount, stateCount);
if (stateCount == 0)
sleAccount->makeFieldAbsent(sfHookStateCount);
else
sleAccount->setFieldU32(sfHookStateCount, stateCount);
view.update(sleAccount);