mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-19 04:57:53 +00:00
Fix bug preventing default from being set to null if already set to an integer.
This commit is contained in:
parent
3f4f7145a3
commit
57b5a33fbb
@ -1018,9 +1018,10 @@ unsigned int EmbeddedNetworkController::handleControlPlaneHttpPOST(
|
||||
json ntag = json::object();
|
||||
const uint64_t tagId = OSUtils::jsonInt(tag["id"],0ULL);
|
||||
ntag["id"] = tagId;
|
||||
if (tag.find("default") == tag.end())
|
||||
ntag["default"] = json();
|
||||
else ntag["default"] = OSUtils::jsonInt(tag["default"],0ULL);
|
||||
json &dfl = tag["default"];
|
||||
if (dfl.is_null())
|
||||
ntag["default"] = dfl;
|
||||
else ntag["default"] = OSUtils::jsonInt(dfl,0ULL);
|
||||
ntags[tagId] = ntag;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user