mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Work toward working directories.
This commit is contained in:
@@ -186,10 +186,20 @@ STVector256* STVector256::construct(SerializerIterator& u, const char *name)
|
||||
{
|
||||
std::vector<unsigned char> data = u.getVL();
|
||||
std::vector<uint256> value;
|
||||
|
||||
int count = data.size() / (256 / 8);
|
||||
value.reserve(count);
|
||||
for(int i = 0; i < count; i++)
|
||||
value.push_back(uint256(std::vector<unsigned char>(&data[i], &data[i + (256 / 8)])));
|
||||
|
||||
unsigned int uStart = 0;
|
||||
for (unsigned int i = 0; i != count; i++)
|
||||
{
|
||||
unsigned int uEnd = uStart+(256/8);
|
||||
|
||||
value.push_back(uint256(std::vector<unsigned char>(&data[uStart], &data[uEnd])));
|
||||
|
||||
uStart = uEnd;
|
||||
}
|
||||
|
||||
return new STVector256(name, value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user