From 12762053e5aff372a9f8d473c71aa81e805bb474 Mon Sep 17 00:00:00 2001 From: Martin Reddy Date: Tue, 22 Sep 2009 18:00:16 +0000 Subject: EXT-944 EXT-1026: converted the LLUrlRegistry::findUrl() method to work on an LLWString instead of a std::string, so that we don't have to worry about character offsets for variable-length-encoded UTF-8 strings. This was causing crashes whenever we would try to show a textbox with a URL and foreign characters (> 1 byte chars). Damn, I suck! --- indra/llui/llurlaction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llui/llurlaction.cpp') diff --git a/indra/llui/llurlaction.cpp b/indra/llui/llurlaction.cpp index 3b689b93c0..7721d0e502 100644 --- a/indra/llui/llurlaction.cpp +++ b/indra/llui/llurlaction.cpp @@ -112,7 +112,7 @@ void LLUrlAction::clickAction(std::string url) void LLUrlAction::teleportToLocation(std::string url) { LLUrlMatch match; - if (LLUrlRegistry::instance().findUrl(url, match)) + if (LLUrlRegistry::instance().findUrl(utf8str_to_wstring(url), match)) { if (! match.getLocation().empty()) { @@ -129,7 +129,7 @@ void LLUrlAction::copyURLToClipboard(std::string url) void LLUrlAction::copyLabelToClipboard(std::string url) { LLUrlMatch match; - if (LLUrlRegistry::instance().findUrl(url, match)) + if (LLUrlRegistry::instance().findUrl(utf8str_to_wstring(url), match)) { LLView::getWindow()->copyTextToClipboard(utf8str_to_wstring(match.getLabel())); } -- cgit v1.3