Browse Source

Handle situation when fill=null in zarr file

lintest
Michael Uleysky 8 months ago
parent
commit
82b233b443
  1. 5
      src/zarr.cpp

5
src/zarr.cpp

@ -80,8 +80,9 @@ Error ZarrFunctions::AddVar(const MString& name, const Json::Value& zattrs, cons
// Read fill_value
{
const auto& fillval = zarray["fill_value"];
if(!fillval) return {pref, "No fillval"};
if(fillval.type() == Json::uintValue)
if(!fillval) // return {pref, "No fillval"};
fill = 0;
else if(fillval.type() == Json::uintValue)
fill = fillval.asUInt64();
else if(fillval.type() == Json::intValue)
fill = fillval.asInt64();

Loading…
Cancel
Save