mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-06 19:14:56 -06:00
15.05
This commit is contained in:
committed by
Kornel Lesiński
parent
0713a3ab80
commit
54490d51d5
@@ -48,7 +48,7 @@ bool ReadNamesFromListFile(CFSTR fileName, UStringVector &strings, UINT codePage
|
||||
return false;
|
||||
file.Close();
|
||||
unsigned num = (unsigned)fileSize / 2;
|
||||
wchar_t *p = u.GetBuffer(num);
|
||||
wchar_t *p = u.GetBuf(num);
|
||||
if (codePage == MY__CP_UTF16)
|
||||
for (unsigned i = 0; i < num; i++)
|
||||
{
|
||||
@@ -65,20 +65,20 @@ bool ReadNamesFromListFile(CFSTR fileName, UStringVector &strings, UINT codePage
|
||||
return false;
|
||||
p[i] = c;
|
||||
}
|
||||
u.ReleaseBuffer(num);
|
||||
p[num] = 0;
|
||||
u.ReleaseBuf_SetLen(num);
|
||||
}
|
||||
else
|
||||
{
|
||||
AString s;
|
||||
char *p = s.GetBuffer((unsigned)fileSize);
|
||||
char *p = s.GetBuf((unsigned)fileSize);
|
||||
UInt32 processed;
|
||||
if (!file.Read(p, (UInt32)fileSize, processed))
|
||||
return false;
|
||||
if (processed != fileSize)
|
||||
return false;
|
||||
file.Close();
|
||||
p[processed] = 0;
|
||||
s.ReleaseBuffer();
|
||||
s.ReleaseBuf_CalcLen((unsigned)processed);
|
||||
if (s.Len() != processed)
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user