We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The encode code produces different results depending on whether it's been compiled with an optimized flag or not.
Optimized:
$ cc -O2 txid2bech32.c txref_code.c segwit_addr.c -lbitcoinrpc -ljansson -o txid2bech32 $ ./txid2bech32 f8cdaff3ebd9e862ed5885f8975489090595abe1470397f79780ead1c7528107 Txref: txtest1-xyv2-xzyq-qqm5-tyke
Non-Optimized:
$ cc txid2bech32.c txref_code.c segwit_addr.c -lbitcoinrpc -ljansson -o txid2bech32 $ ./txid2bech32 f8cdaff3ebd9e862ed5885f8975489090595abe1470397f79780ead1c7528107 Txref: txtest1-xxyv-xzxz-qqmq-tyke
The optimized results are the correct ones.
The non-optimized bug occurs in the hyphenation memcopy codes, starting with this line:
memcpy(output+olen-5, output+olen-8, 4);
The problem seems to occur due to the overlapping copy.
Here's the results of that line:
Optimized
txtest1xyv2xzyqqqm5tyketyke txtest1xyv2xzyqqqmqqm5etyke
txtest1xyv2xzyqqqm5tyketyke txtest1xyv2xzyqqqmqqmqetyke
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The encode code produces different results depending on whether it's been compiled with an optimized flag or not.
Optimized:
Non-Optimized:
The optimized results are the correct ones.
The non-optimized bug occurs in the hyphenation memcopy codes, starting with this line:
The problem seems to occur due to the overlapping copy.
Here's the results of that line:
Optimized
Non-Optimized:
The text was updated successfully, but these errors were encountered: