diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-03-11 17:12:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-03-11 17:14:13 +0000 |
commit | 6617505ee19cd0fa1f19815f5a736755e488beae (patch) | |
tree | 4968f1ea3923ffa5134d1cbe48d1e5f81a031f0e /shell | |
parent | fa8543c558d6402077b9f85ab60c6961e5d6949f (diff) |
V512: we want the number of wide-chars here, not the number of bytes
Change-Id: I121cdfd586562b9ce298448f51d0b2e3b2a52c39
Diffstat (limited to 'shell')
-rw-r--r-- | shell/source/win32/shlxthandler/columninfo/columninfo.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/shell/source/win32/shlxthandler/columninfo/columninfo.cxx b/shell/source/win32/shlxthandler/columninfo/columninfo.cxx index 6f4129e8f21f..9eeb252d182c 100644 --- a/shell/source/win32/shlxthandler/columninfo/columninfo.cxx +++ b/shell/source/win32/shlxthandler/columninfo/columninfo.cxx @@ -110,10 +110,7 @@ HRESULT STDMETHODCALLTYPE CColumnInfo::Initialize(LPCSHCOLUMNINIT /*psci*/) return S_OK; } - // Register all columns we support - - HRESULT STDMETHODCALLTYPE CColumnInfo::GetColumnInfo(DWORD dwIndex, SHCOLUMNINFO *psci) { if (dwIndex >= ColumnInfoTableSize) @@ -126,14 +123,12 @@ HRESULT STDMETHODCALLTYPE CColumnInfo::GetColumnInfo(DWORD dwIndex, SHCOLUMNINFO psci->scid.fmtid = ColumnInfoTable[dwIndex].scid.fmtid; psci->scid.pid = ColumnInfoTable[dwIndex].scid.pid; ZeroMemory(psci->wszTitle, sizeof(psci->wszTitle)); - wcsncpy(psci->wszTitle, ColumnInfoTable[dwIndex].wszTitle, (sizeof(psci->wszTitle) - 1)); - + wcsncpy(psci->wszTitle, ColumnInfoTable[dwIndex].wszTitle, + (sizeof(psci->wszTitle) / sizeof(psci->wszTitle[0]) - 1)); return S_OK; } - - HRESULT STDMETHODCALLTYPE CColumnInfo::GetItemData(LPCSHCOLUMNID pscid, LPCSHCOLUMNDATA pscd, VARIANT *pvarData) { if (IsOOFileExtension(pscd->pwszExt)) |