update patch with str4d's upstream suggestion

This commit is contained in:
Conrado Gouvea 2024-03-04 10:23:26 -03:00
parent f785f098cb
commit 8207534c8e
2 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@ public:
{
static_assert(hash_select < 8, "BundleCacheHasher only has 8 hashes available.");
uint32_t u;
std::memcpy(&u, &*(key.begin() + 4 * hash_select), 4);
std::memcpy(&u, key.data() + 4 * hash_select, 4);
return u;
}
};

View File

@ -4,11 +4,11 @@ index c5cd6b173c..1da334b377 100644
+++ b/depend/zcash/src/zcash/cache.cpp
@@ -3,7 +3,7 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "zcash/cache.h"
-#include "util/system.h"
+// #include "util/system.h"
namespace libzcash
{
@@ -11,8 +11,8 @@ std::unique_ptr<BundleValidityCache> NewBundleValidityCache(rust::Str kind, size
@ -31,7 +31,7 @@ index 9bef1e43b5..283123bec9 100644
static_assert(hash_select < 8, "BundleCacheHasher only has 8 hashes available.");
uint32_t u;
- std::memcpy(&u, key.begin() + 4 * hash_select, 4);
+ std::memcpy(&u, &*(key.begin() + 4 * hash_select), 4);
+ std::memcpy(&u, key.data() + 4 * hash_select, 4);
return u;
}
};