mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-15 02:36:16 +02:00
std::string_view shall not be null terminated
This commit is contained in:
parent
e21c7895eb
commit
de96f632f8
1 changed files with 1 additions and 3 deletions
|
@ -539,7 +539,7 @@ std::optional<EvalState::Doc> EvalState::getDoc(Value & v)
|
||||||
if (v.isLambda()) {
|
if (v.isLambda()) {
|
||||||
auto exprLambda = v.payload.lambda.fun;
|
auto exprLambda = v.payload.lambda.fun;
|
||||||
|
|
||||||
std::ostringstream s(std::ios_base::out);
|
std::ostringstream s;
|
||||||
std::string name;
|
std::string name;
|
||||||
auto pos = positions[exprLambda->getPos()];
|
auto pos = positions[exprLambda->getPos()];
|
||||||
std::string docStr;
|
std::string docStr;
|
||||||
|
@ -571,8 +571,6 @@ std::optional<EvalState::Doc> EvalState::getDoc(Value & v)
|
||||||
|
|
||||||
s << docStr;
|
s << docStr;
|
||||||
|
|
||||||
s << '\0'; // for making a c string below
|
|
||||||
|
|
||||||
return Doc {
|
return Doc {
|
||||||
.pos = pos,
|
.pos = pos,
|
||||||
.name = name,
|
.name = name,
|
||||||
|
|
Loading…
Reference in a new issue