From 24af8482460e7d6edbd6ccd7cd2c3e86af963382 Mon Sep 17 00:00:00 2001 From: ricardoofnl Date: Sun, 30 Aug 2026 17:10:14 +0700 Subject: [PATCH] [saco] Match `CUniBuffer::InsertString`; the moves are in WCHARs --- saco/d3d9/common/DXUTgui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/saco/d3d9/common/DXUTgui.cpp b/saco/d3d9/common/DXUTgui.cpp index 47fb79d..7bd0b47 100644 --- a/saco/d3d9/common/DXUTgui.cpp +++ b/saco/d3d9/common/DXUTgui.cpp @@ -7762,8 +7762,8 @@ bool CUniBuffer::InsertString( int nIndex, const WCHAR *pStr, int nCount ) return false; // out of memory } - MoveMemory( m_pwszBuffer + nIndex + nCount, m_pwszBuffer + nIndex, sizeof(TCHAR) * ( lstrlenW( m_pwszBuffer ) - nIndex + 1 ) ); - CopyMemory( m_pwszBuffer + nIndex, pStr, nCount * sizeof(TCHAR) ); + MoveMemory( m_pwszBuffer + nIndex + nCount, m_pwszBuffer + nIndex, sizeof(WCHAR) * ( lstrlenW( m_pwszBuffer ) - nIndex + 1 ) ); + CopyMemory( m_pwszBuffer + nIndex, pStr, nCount * sizeof(WCHAR) ); m_bAnalyseRequired = true; return true;