Browse Source
Unlike std::basic_string::data() and string literals, data() may return a pointer to a buffer that is not null-terminated. Therefore it is typically a mistake to pass data() to a routine that takes just a const CharT* and expects a null-terminated string. The bug was calling string_view .data() after calling substr() that ends before the null terminator, as it will just return the entire string_view.master
Riyyi
3 years ago
1 changed files with 1 additions and 1 deletions
Loading…
Reference in new issue