summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewscript.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-05-06 22:13:40 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-05-06 22:13:40 +0300
commitf655bb1f27fa637ef1889f8bb83bb0d74d645059 (patch)
tree9992f73059230cf04c8f0b9206fac306f23c8db3 /indra/newview/llpreviewscript.cpp
parent0bf68ce7363dc9114000a6a5a40de87f79b28f37 (diff)
parentce65bc2f13409d75dbc6502c970030cc5ed2e5ad (diff)
Merge branch master (DRTVWR-515) into DRTVWR-483
# Conflicts: # indra/newview/CMakeLists.txt # indra/newview/llpanelpicks.cpp (was replaced with a tab in floater)
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
-rw-r--r--indra/newview/llpreviewscript.cpp5
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();
}