summaryrefslogtreecommitdiff
path: root/indra/win_crash_logger
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2007-05-02 21:24:47 +0000
committerDon Kjer <don@lindenlab.com>2007-05-02 21:24:47 +0000
commit1c909afe3998778e4cc045c9ab733e8afbf7c25b (patch)
tree75c00a32a8e305280cbec253195d1113d628fc3e /indra/win_crash_logger
parentbc59c04653bf1404e8148a8169208b146a123b28 (diff)
svn merge -r 60342:61148 svn+ssh://svn/svn/linden/branches/maintenance into release
Diffstat (limited to 'indra/win_crash_logger')
-rw-r--r--indra/win_crash_logger/win_crash_logger.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/win_crash_logger/win_crash_logger.cpp b/indra/win_crash_logger/win_crash_logger.cpp
index 848d4006fd..8760ae43f8 100644
--- a/indra/win_crash_logger/win_crash_logger.cpp
+++ b/indra/win_crash_logger/win_crash_logger.cpp
@@ -180,7 +180,8 @@ int APIENTRY WinMain(HINSTANCE hInstance,
{
i++;
- mbstowcs(gProductName, argv[i], sizeof(gProductName));
+ mbstowcs(gProductName, argv[i], sizeof(gProductName)/sizeof(gProductName[0]));
+ gProductName[ sizeof(gProductName)/sizeof(gProductName[0]) - 1 ] = 0;
llinfos << "Got product name " << argv[i] << llendl;
}
}
@@ -369,6 +370,7 @@ class LLFileEncoder
{
public:
LLFileEncoder(const char *formname, const char *filename);
+ ~LLFileEncoder();
BOOL isValid() const { return mIsValid; }
LLString encodeURL(const S32 max_length = 0);
@@ -817,6 +819,15 @@ LLFileEncoder::LLFileEncoder(const char *form_name, const char *filename)
mIsValid = TRUE;
}
+LLFileEncoder::~LLFileEncoder()
+{
+ if (mBuf)
+ {
+ delete mBuf;
+ mBuf = NULL;
+ }
+}
+
LLString LLFileEncoder::encodeURL(const S32 max_length)
{
LLString result = mFormname;