diff options
| author | Erik Kundiman <erik@megapahit.org> | 2026-10-24 14:27:02 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2026-10-24 14:27:02 +0800 |
| commit | 15b3c7ba741c64d41e52fbff4074c19ee96ae39b (patch) | |
| tree | 0c56e55fac9bfc58dba5b07fc82bffbb0d4731f2 /indra/llui/llclipboard.cpp | |
| parent | 57552eb04bdbb6db875cf414ccac552934240d7c (diff) | |
| parent | cb5dd9181198cab5fadc71fa548201af0234128f (diff) | |
Merge tag 'Second_Life_Release#cb5dd918-26.5' into 26.526.5
Diffstat (limited to 'indra/llui/llclipboard.cpp')
| -rw-r--r-- | indra/llui/llclipboard.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/llui/llclipboard.cpp b/indra/llui/llclipboard.cpp index 64896ccfcb..0483da001f 100644 --- a/indra/llui/llclipboard.cpp +++ b/indra/llui/llclipboard.cpp @@ -132,6 +132,11 @@ bool LLClipboard::addToClipboard(const LLWString &src, S32 pos, S32 len, bool us LL_WARNS() << "Can't add the substring to clipboard: " << e.what() << LL_ENDL; return false; } + + // Clipboards cannot contain NULL characters, so remove them first so they + // do not truncate the string. + mString.erase(std::remove(mString.begin(), mString.end(), 0), mString.end()); + return (use_primary ? LLView::getWindow()->copyTextToPrimary(mString) : LLView::getWindow()->copyTextToClipboard(mString)); } |
