mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 23:40:57 +01:00
ircd: Fix string length of demangle() value.
This commit is contained in:
parent
b3a1c42c42
commit
2a17d2b939
1 changed files with 1 additions and 2 deletions
|
@ -606,8 +606,7 @@ ircd::demangle(const std::string &symbol)
|
||||||
if(unlikely(!len))
|
if(unlikely(!len))
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
assert(*(buf.get() + len - 1) == '\0');
|
return std::string { buf.get(), strnlen(buf.get(), len) };
|
||||||
return std::string { buf.get(), len - 1 };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Reference in a new issue