diff options
Diffstat (limited to 'CPP/7zip/UI/Agent')
-rw-r--r-- | CPP/7zip/UI/Agent/AgentProxy.cpp | 4 | ||||
-rw-r--r-- | CPP/7zip/UI/Agent/StdAfx.h | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/CPP/7zip/UI/Agent/AgentProxy.cpp b/CPP/7zip/UI/Agent/AgentProxy.cpp index a31a904b..301d3a33 100644 --- a/CPP/7zip/UI/Agent/AgentProxy.cpp +++ b/CPP/7zip/UI/Agent/AgentProxy.cpp @@ -492,8 +492,8 @@ HRESULT CProxyArchive2::Load(const CArc &arc, IProgress *progress) { file.Name = (const wchar_t *)p; file.NameSize = 0; - if (size >= 2) - file.NameSize = size / 2 - 1; + if (size >= sizeof(wchar_t)) + file.NameSize = size / sizeof(wchar_t) - 1; } else #endif diff --git a/CPP/7zip/UI/Agent/StdAfx.h b/CPP/7zip/UI/Agent/StdAfx.h new file mode 100644 index 00000000..2854ff3e --- /dev/null +++ b/CPP/7zip/UI/Agent/StdAfx.h @@ -0,0 +1,8 @@ +// StdAfx.h + +#ifndef __STDAFX_H +#define __STDAFX_H + +#include "../../../Common/Common.h" + +#endif |