summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_string.inl2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/m_string.inl b/include/m_string.inl
index 7834a573bb..e4cb32a4a6 100644
--- a/include/m_string.inl
+++ b/include/m_string.inl
@@ -112,7 +112,7 @@ void CMSimpleStringT<BaseType>::Append(PCXSTR pszSrc, int nLength)
}
//Make sure we don't read pass end of the terminating NULL
- int nSrcLength = StringLength(pszSrc);
+ int nSrcLength = StringLengthN(pszSrc, nLength);
nLength = nLength > nSrcLength ? nSrcLength : nLength;
int nNewLength = nOldLength + nLength;