OSDN Git Service

GhostTextBuffer.cpp: Fix incorrect size being passed to CopyMemory(). (https://bitbuc...
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sat, 12 Jan 2019 04:01:47 +0000 (13:01 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sat, 12 Jan 2019 04:01:47 +0000 (13:01 +0900)
Src/GhostTextBuffer.cpp

index 06797ba..c7109d5 100644 (file)
@@ -216,7 +216,7 @@ GetTextWithoutEmptys(int nStartLine, int nStartChar,
                                // (If this happens, editor probably has bug)
                                ASSERT(false);
                                CString sEol = GetStringEol (nCrlfStyle);
-                               CopyMemory(pszBuf, sEol, sEol.GetLength());
+                               CopyMemory(pszBuf, sEol, sEol.GetLength() * sizeof(TCHAR));
                                pszBuf += sEol.GetLength();
                        }
                }