mirror of
https://github.com/matrix-construct/construct
synced 2025-01-13 08:23:56 +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))
|
||||
return {};
|
||||
|
||||
assert(*(buf.get() + len - 1) == '\0');
|
||||
return std::string { buf.get(), len - 1 };
|
||||
return std::string { buf.get(), strnlen(buf.get(), len) };
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in a new issue