summaryrefslogtreecommitdiff
path: root/indra/llmessage/lltemplatemessagereader.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-03-24 16:51:07 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-03-24 16:51:07 -0700
commitda407e32fdb68e5aecff99c970d654293e21d0d9 (patch)
tree95ed03c2d77c1ef2920cd940345f70ab32bcf97d /indra/llmessage/lltemplatemessagereader.cpp
parent7480e069349e2b3a7581267d13f52c63e459af64 (diff)
parent7857f59f9e7c673f1ddbf32d6a66e85f78004445 (diff)
Merge
Diffstat (limited to 'indra/llmessage/lltemplatemessagereader.cpp')
-rw-r--r--indra/llmessage/lltemplatemessagereader.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp
index 6682575ca5..8f56cf2521 100644
--- a/indra/llmessage/lltemplatemessagereader.cpp
+++ b/indra/llmessage/lltemplatemessagereader.cpp
@@ -433,10 +433,9 @@ inline void LLTemplateMessageReader::getString(const char *block, const char *va
inline void LLTemplateMessageReader::getString(const char *block, const char *var, std::string& outstr, S32 blocknum )
{
- char s[MTUBYTES];
- s[0] = '\0';
+ char s[MTUBYTES + 1]= {0}; // every element is initialized with 0
getData(block, var, s, 0, blocknum, MTUBYTES);
- s[MTUBYTES - 1] = '\0';
+ s[MTUBYTES] = '\0';
outstr = s;
}