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

Fix wrong data #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix wrong data #2

wants to merge 1 commit into from

Conversation

AlexGuo1998
Copy link

@AlexGuo1998 AlexGuo1998 commented Apr 11, 2019

82 ('R') should be 72 ('H') here. Maybe some mistakes in refactoring:
5a4b88b#diff-8e2c3c7e3979240badeac46c09c0dfd8R269
(Original https://github.com/s-macke/SAM/blob/bcf92b5c693cbaf25e26c17c1c1b0589b3647489/src/reciter.c#L492-L493)

BTW, I'm trying to totally re-write reciter in C.

82 ('R') should be 72 ('H') here. Maybe some mistakes in refactoring:
vidarh@5a4b88b#diff-8e2c3c7e3979240badeac46c09c0dfd8R269
@AlexGuo1998
Copy link
Author

Hm... Some more strange things here.

It seems r is always 1. A bug in original program?

SAM/src/reciter.c

Lines 212 to 216 in b735dbd

if(!Code37055(mem59-1,4)) {
A = inputtemp[X];
if (A != 72) r = 1;
if ((A != 84) && (A != 67) && (A != 83)) r = 1;
}

if Code37055(mem58+1, 4) == 0 is true, A would be chars other than D J L N R S T Z.
But 72='H', 84='T', 67='C', 83='S'...

SAM/src/reciter.c

Lines 281 to 287 in b735dbd

if(Code37055(mem58+1, 4) == 0) {
A = inputtemp[X];
if ((A != 72) && (A != 84) &&
(A != 67) && (A != 83)) r = 1;
} else {
r = -2;
}

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.

1 participant