Skip to content

Commit fac3a78

Browse files
author
MarcoFalke
committed
refactor: Avoid needless, unsafe c-style cast
1 parent 477b357 commit fac3a78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/base58.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ std::string EncodeBase58Check(Span<const unsigned char> input)
139139
// add 4-byte hash check to the end
140140
std::vector<unsigned char> vch(input.begin(), input.end());
141141
uint256 hash = Hash(vch);
142-
vch.insert(vch.end(), (unsigned char*)&hash, (unsigned char*)&hash + 4);
142+
vch.insert(vch.end(), hash.data(), hash.data() + 4);
143143
return EncodeBase58(vch);
144144
}
145145

0 commit comments

Comments
 (0)