diff options
Diffstat (limited to '')
-rw-r--r-- | CPP/7zip/Archive/ComHandler.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/CPP/7zip/Archive/ComHandler.cpp b/CPP/7zip/Archive/ComHandler.cpp index 7aabd65..82d939d 100644 --- a/CPP/7zip/Archive/ComHandler.cpp +++ b/CPP/7zip/Archive/ComHandler.cpp | |||
@@ -252,9 +252,9 @@ static UString CompoundNameToFileName(const UString &s) | |||
252 | const wchar_t c = s[i]; | 252 | const wchar_t c = s[i]; |
253 | if ((unsigned)(int)c < 0x20) | 253 | if ((unsigned)(int)c < 0x20) |
254 | { | 254 | { |
255 | res += '['; | 255 | res.Add_Char('['); |
256 | res.Add_UInt32((UInt32)(unsigned)(int)c); | 256 | res.Add_UInt32((UInt32)(unsigned)(int)c); |
257 | res += ']'; | 257 | res.Add_Char(']'); |
258 | } | 258 | } |
259 | else | 259 | else |
260 | res += c; | 260 | res += c; |
@@ -309,20 +309,20 @@ static bool CompoundMsiNameToFileName(const UString &name, UString &res) | |||
309 | if (i == 0) | 309 | if (i == 0) |
310 | res += k_Msi_ID; | 310 | res += k_Msi_ID; |
311 | */ | 311 | */ |
312 | c -= k_Msi_StartUnicodeChar; | 312 | c -= (wchar_t)k_Msi_StartUnicodeChar; |
313 | 313 | ||
314 | unsigned c0 = (unsigned)c & k_Msi_CharMask; | 314 | const unsigned c0 = (unsigned)c & k_Msi_CharMask; |
315 | unsigned c1 = (unsigned)c >> k_Msi_NumBits; | 315 | const unsigned c1 = (unsigned)c >> k_Msi_NumBits; |
316 | 316 | ||
317 | if (c1 <= k_Msi_NumChars) | 317 | if (c1 <= k_Msi_NumChars) |
318 | { | 318 | { |
319 | res += k_Msi_Chars[c0]; | 319 | res.Add_Char(k_Msi_Chars[c0]); |
320 | if (c1 == k_Msi_NumChars) | 320 | if (c1 == k_Msi_NumChars) |
321 | break; | 321 | break; |
322 | res += k_Msi_Chars[c1]; | 322 | res.Add_Char(k_Msi_Chars[c1]); |
323 | } | 323 | } |
324 | else | 324 | else |
325 | res += k_Msi_SpecChar; | 325 | res.Add_Char(k_Msi_SpecChar); |
326 | } | 326 | } |
327 | return true; | 327 | return true; |
328 | } | 328 | } |