diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-04-30 03:04:47 +0300 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-04-30 03:04:47 +0300 |
| commit | 0fa5fc47a2069a2c151536baa917b9c6978480e4 (patch) | |
| tree | 2964096f28a6a5e7f08e5a0aa83f2ffe76d42421 /indra/newview/llpreviewscript.cpp | |
| parent | 498b72aacd6d10dfcd4f15e1d16532dc138f0461 (diff) | |
| parent | ce65bc2f13409d75dbc6502c970030cc5ed2e5ad (diff) | |
Merge branch 'master' into DRTVWR-527-maint
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
| -rw-r--r-- | indra/newview/llpreviewscript.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 5e81fa6402..4c539ded38 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -733,7 +733,10 @@ void LLScriptEdCore::updateDynamicHelp(BOOL immediate) } if (immediate || (mLiveHelpTimer.getStarted() && mLiveHelpTimer.getElapsedTimeF32() > LIVE_HELP_REFRESH_TIME)) { - std::string help_string = mEditor->getText().substr(segment->getStart(), segment->getEnd() - segment->getStart()); + // Use Wtext since segment's start/end are made for wstring and will + // result in a shift for case of multi-byte symbols inside std::string. + LLWString segment_text = mEditor->getWText().substr(segment->getStart(), segment->getEnd() - segment->getStart()); + std::string help_string = wstring_to_utf8str(segment_text); setHelpPage(help_string); mLiveHelpTimer.stop(); } |
