Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2014-12-26 03:00:00 +0300
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:16:53 +0300
commit7e021179cd9f46b5bf2d48aac84783ff431dd5ac (patch)
tree0004a11d40a6a4e61bd4216ea106ce1c27ddb62a /CPP/7zip/Archive/Rar
parent0dc16c691d208c904468ba4a2779bbe3a2b4dc4b (diff)
9.369.36
Diffstat (limited to 'CPP/7zip/Archive/Rar')
-rw-r--r--CPP/7zip/Archive/Rar/RarHandler.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/CPP/7zip/Archive/Rar/RarHandler.cpp b/CPP/7zip/Archive/Rar/RarHandler.cpp
index c4adee41..d54995ef 100644
--- a/CPP/7zip/Archive/Rar/RarHandler.cpp
+++ b/CPP/7zip/Archive/Rar/RarHandler.cpp
@@ -964,22 +964,21 @@ STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *val
case kpidUnpackVer: prop = item.UnPackVersion; break;
case kpidMethod:
{
- char temp[16];
- char *s = temp;
- if (item.Method >= (Byte)'0' && item.Method <= (Byte)'5')
+ char s[16];
+ Byte m = item.Method;
+ if (m < (Byte)'0' || m > (Byte)'5')
+ ConvertUInt32ToString(m, s);
+ else
{
- *s++ = 'm';
- *s++ = (char)item.Method;
+ s[0] = 'm';
+ s[1] = (char)m;
+ s[2] = 0;
if (!item.IsDir())
{
- *s++ = ':';
- ConvertUInt32ToString(16 + item.GetDictSize(), s);
+ s[2] = ':';
+ ConvertUInt32ToString(16 + item.GetDictSize(), &s[3]);
}
}
- else
- ConvertUInt32ToString(item.Method, s);
- s += MyStringLen(s);
- *s = 0;
prop = s;
break;
}