Skip to content

Commit

Permalink
w
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Feb 20, 2025
1 parent 72492b1 commit 14b0827
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/paramdict.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,15 @@ int ParamDict::load_param_bin(const DataReader& dr)

tmpstr[len_padded] = '\0';

#if NCNN_SIMPLESTL
// simple stl string has no tail zero by default, append one
d->params[id].s.resize(len + 1);
memcpy(d->params[id].s.data(), tmpstr.data(), len);
d->params[id].s[len] = '\0';
d->params[id].s.resize(len);
#else
d->params[id].s = tmpstr.data();
#endif

d->params[id].type = 7;
}
Expand Down

0 comments on commit 14b0827

Please sign in to comment.