ZephyrProtocol / zephyr

The Untraceable Stablecoin Protocol.
Other
115 stars 18 forks source link

Update string_tools.h #13

Closed DeMemeTree closed 12 months ago

DeMemeTree commented 12 months ago

This allows the GENESIS_TX to be parsed and no longer freezes the iOS device when creating a wallet. Please double check this as I used ChatGPT LOL

"In this code, I've added a helper function hex_char_to_byte to convert a single hex character to a byte. The parse_hexstr_to_binbuff function now iterates over the input string two characters at a time, converting each pair of hex characters into a byte and adding it to the result. This approach ensures that trailing zeros are correctly processed. The function also handles potential errors, such as invalid hex characters and odd-length hex strings."

DeMemeTree commented 12 months ago

Hm Not sure if it was a cache issue but when rebuilding Im getting the problem again.. 😔