Skip to content
New issue

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

Fixes #100. We can assume it is working. #101

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gurelkaynak
Copy link

without assert(0) the else if block works fine. There are no errors, builds and runs successfully.

@BenWiederhake
Copy link
Contributor

BenWiederhake commented Jun 9, 2016

Have you actually tested that? I doubt that the following part works:

htobe64(val);
TGLC_bn_bin2bn ((unsigned char *) &val, 8, b);

It should probably say:

val = htobe64(val);
TGLC_bn_bin2bn ((unsigned char *) &val, 8, b);

... because htobe64 doesn't write into val, nothing happens on Little Endian systems, so I would be surprised if that actually does something useful.

EDIT: Yeah, I'm aware that I wrote that code. These two lines are broken nevertheless.

@gurelkaynak
Copy link
Author

The case was like this. I cloned everything, then configure, make and everything. It gave me the assert error on that line. When I went to the code this was the place that was broken, so I removed the assert(0) and everything worked fine. So, yes I had to test it to make it run.

@BenWiederhake
Copy link
Contributor

You mentioned one assert-induced crash, but removed two asserts.
Which one crashed? And what argument do you have about why the "probably-faulty" code could possibly work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants