diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-09-03 14:36:54 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-09-03 14:36:54 +1000 |
| commit | 99a3a904e4d9cc2e4d92edbbf1ebbd0892d3918e (patch) | |
| tree | bd947334eb2936ca26fa897a6d41245cdbf1c03a /src/locale | |
| parent | e6921dc0556d567557b5673a475199121898421f (diff) | |
| download | tangara-fw-99a3a904e4d9cc2e4d92edbbf1ebbd0892d3918e.tar.gz | |
Handle collation text that includes '\0'
This seems to be tickled by the ogg comment handling changes (possibly libtags doesn't actually handle this case?)
Diffstat (limited to 'src/locale')
| -rw-r--r-- | src/locale/collation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/locale/collation.cpp b/src/locale/collation.cpp index 8748742d..c3360483 100644 --- a/src/locale/collation.cpp +++ b/src/locale/collation.cpp @@ -89,8 +89,8 @@ GLibCollator::~GLibCollator() { auto GLibCollator::Transform(const std::string& in) -> std::string { size_t size = glib_strxfrm(NULL, in.c_str(), 0, locale_data_.get()); char* dest = new char[size + 1]{0}; - glib_strxfrm(dest, in.c_str(), size, locale_data_.get()); - std::string out{dest, strnlen(dest, size)}; + size = glib_strxfrm(dest, in.c_str(), size, locale_data_.get()); + std::string out{dest, size}; delete[] dest; return out; } |
