From 4fae369d2d6aa60e2bb45eea1fb05659a2599caa Mon Sep 17 00:00:00 2001 From: Tino Reichardt Date: Sat, 18 Feb 2023 19:11:16 +0100 Subject: [PATCH] Fix selectable uppercase / lowercase hash formatting - the last fix was not done correctly - issue #177 is solved really now Signed-off-by: Tino Reichardt --- C/7zVersion.h | 6 +++--- CPP/7zip/UI/Common/HashCalc.cpp | 10 ++++------ CPP/7zip/UI/Explorer/ContextMenu.cpp | 2 +- README.md | 2 +- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/C/7zVersion.h b/C/7zVersion.h index beb9ba13..8f8e8593 100644 --- a/C/7zVersion.h +++ b/C/7zVersion.h @@ -1,7 +1,7 @@ #define MY_VER_MAJOR 22 #define MY_VER_MINOR 01 -#define MY_VER_BUILD 0 -#define MY_VERSION_NUMBERS "22.01 ZS v1.5.4 R1" +#define MY_VER_BUILD 02 +#define MY_VERSION_NUMBERS "22.01 ZS v1.5.4 R2" #define MY_VERSION MY_VERSION_NUMBERS #ifdef MY_CPU_NAME @@ -10,7 +10,7 @@ #define MY_VERSION_CPU MY_VERSION #endif -#define MY_DATE "2023-02-12" +#define MY_DATE "2023-02-18" #undef MY_COPYRIGHT #undef MY_VERSION_COPYRIGHT_DATE #define MY_AUTHOR_NAME "Igor Pavlov, Tino Reichardt" diff --git a/CPP/7zip/UI/Common/HashCalc.cpp b/CPP/7zip/UI/Common/HashCalc.cpp index 49955c10..161ebe5a 100644 --- a/CPP/7zip/UI/Common/HashCalc.cpp +++ b/CPP/7zip/UI/Common/HashCalc.cpp @@ -21,10 +21,6 @@ #include "../FileManager/RegistryUtils.h" #endif -#ifdef WANT_OPTIONAL_LOWERCASE -#include "../FileManager/RegistryUtils.h" -#endif - #include "EnumDirItems.h" #include "HashCalc.h" @@ -657,15 +653,17 @@ static inline char GetHex_Upper(unsigned v) { #ifdef WANT_OPTIONAL_LOWERCASE if (WantLowercaseHashes()) - { return (char)((v < 10) ? ('0' + v) : ('a' + (v - 10))); - } #endif return (char)((v < 10) ? ('0' + v) : ('A' + (v - 10))); } static inline char GetHex_Lower(unsigned v) { +#ifdef WANT_OPTIONAL_LOWERCASE + if (!WantLowercaseHashes()) + return (char)((v < 10) ? ('0' + v) : ('A' + (v - 10))); +#endif return (char)((v < 10) ? ('0' + v) : ('a' + (v - 10))); } diff --git a/CPP/7zip/UI/Explorer/ContextMenu.cpp b/CPP/7zip/UI/Explorer/ContextMenu.cpp index 704b5e16..231fdbdd 100644 --- a/CPP/7zip/UI/Explorer/ContextMenu.cpp +++ b/CPP/7zip/UI/Explorer/ContextMenu.cpp @@ -883,7 +883,7 @@ STDMETHODIMP CZipContextMenu::QueryContextMenu(HMENU hMenu, UINT indexMenu, CMenu menu; menu.Attach(hMenu); menuDestroyer.Disable(); - MyAddSubMenu(_commandMap, kMainVerb, menu, indexMenu++, currentCommandID++, (UString)"7-Zip ZS", + MyAddSubMenu(_commandMap, kCheckSumCascadedVerb, menu, indexMenu++, currentCommandID++, (UString)"7-Zip ZS", popupMenu, // popupMenu.Detach(), bitmap); } diff --git a/README.md b/README.md index 679370df..969c1c8e 100644 --- a/README.md +++ b/README.md @@ -297,7 +297,7 @@ You find this project useful, maybe you consider a donation ;-) - [Zstandard] Version 1.5.4 - [BLAKE3] Version 0.3.7 -/TR 2023-02-12 +/TR 2023-02-18 ## Notes