summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/lltextbase.cpp2
-rw-r--r--indra/newview/llappearancemgr.cpp1
-rw-r--r--indra/newview/llfloateruipreview.cpp4
3 files changed, 4 insertions, 3 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 0312802b44..a12b7793f7 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -2496,7 +2496,7 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin
LLUIImagePtr image = mStyle->getImage();
if( image.notNull())
{
- num_pixels -= image->getWidth();
+ num_pixels = llmax(0, num_pixels - image->getWidth());
}
// search for newline and if found, truncate there
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 8f4ce4498e..5088c65122 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1081,7 +1081,6 @@ void LLAppearanceManager::addCOFItemLink(const LLInventoryItem *item, bool do_up
// MULTI-WEARABLES: revisit if more than one per type is allowed.
else if (areMatchingWearables(vitem,inv_item))
{
- gAgentWearables.removeWearable(inv_item->getWearableType(),true,0);
if (inv_item->getIsLinkType())
{
gInventory.purgeObject(inv_item->getUUID());
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index 645f8ef054..c6e12476bd 100644
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -1091,7 +1091,9 @@ void LLFloaterUIPreview::onClickEditFloater()
char *args2 = new char[args.size() + 1]; // Windows requires that the second parameter to CreateProcessA be a writable (non-const) string...
strcpy(args2, args.c_str());
- if(!CreateProcessA(exe_path.c_str(), args2, NULL, NULL, FALSE, 0, NULL, exe_dir.c_str(), &sinfo, &pinfo))
+ // we don't want the current directory to be the executable directory, since the file path is now relative. By using
+ // NULL for the current directory instead of exe_dir.c_str(), the path to the target file will work.
+ if(!CreateProcessA(exe_path.c_str(), args2, NULL, NULL, FALSE, 0, NULL, NULL, &sinfo, &pinfo))
{
// DWORD dwErr = GetLastError();
std::string warning = "Creating editor process failed!";