From c07901e29ed545bbb02e3bddf148fe1104b94e9f Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:44:56 -0500 Subject: Second Life viewer sources 1.15.1.3 --- linden/indra/win_crash_logger/win_crash_logger.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'linden/indra/win_crash_logger') diff --git a/linden/indra/win_crash_logger/win_crash_logger.cpp b/linden/indra/win_crash_logger/win_crash_logger.cpp index a227faf..ddfca5e 100644 --- a/linden/indra/win_crash_logger/win_crash_logger.cpp +++ b/linden/indra/win_crash_logger/win_crash_logger.cpp @@ -200,7 +200,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; } } @@ -389,6 +390,7 @@ class LLFileEncoder { public: LLFileEncoder(const char *formname, const char *filename); + ~LLFileEncoder(); BOOL isValid() const { return mIsValid; } LLString encodeURL(const S32 max_length = 0); @@ -837,6 +839,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; -- cgit v1.1