From ec5803f06f2468c3b2f114c71f15b2e3df6cf10c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Wed, 1 Apr 2020 15:40:51 +0200 Subject: [PATCH] [python] Test: fix printText --- python/test/execution_environment.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/test/execution_environment.cpp b/python/test/execution_environment.cpp index d606695c6..4671d6a00 100644 --- a/python/test/execution_environment.cpp +++ b/python/test/execution_environment.cpp @@ -7,7 +7,8 @@ char TestExecutionEnvironment::s_pythonHeap[TestExecutionEnvironment::s_pythonHe void TestExecutionEnvironment::printText(const char * text, size_t length) { assert(m_printTextIndex + length < k_maxPrintedTextSize); - m_printTextIndex += strlcpy(m_printTextBuffer + m_printTextIndex, text, length + 1); + strlcpy(m_printTextBuffer + m_printTextIndex, text, length + 1); + m_printTextIndex += length; m_printTextBuffer[m_printTextIndex] = 0; }