Skip to content

Commit

Permalink
NetCDF Type fix (string buffer conversion issue)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmaciel committed Nov 23, 2024
1 parent 1808114 commit 1970543
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/mir/netcdf/Type.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "mir/netcdf/Type.h"

#include <algorithm>
#include <cstring>
#include <ostream>
#include <vector>

Expand Down Expand Up @@ -416,7 +415,7 @@ Value* TypeT<std::string>::attributeValue(int nc, int id, const char* name, size

std::string value(len + 1, '\0');
NC_CALL(nc_get_att_text(nc, id, name, value.data()), path);
auto* v = new ValueT<std::string>(*this, value);
auto* v = new ValueT<std::string>(*this, value.data());
return v;
}

Expand Down

0 comments on commit 1970543

Please sign in to comment.