kad-ecoli / TMalign

This repo is outdated. Please use https://github.com/pylelab/USalign instead
https://github.com/pylelab/USalign
11 stars 9 forks source link

basic_fun.h, AAmap fallback for lowercase letters adds to memory address #12

Closed bienchen closed 4 years ago

bienchen commented 4 years ago

https://github.com/kad-ecoli/TMalign/blob/e547a212e30862de61bdf7b119ee89873261fa5e/basic_fun.h#L79

The fallback for lowercase letters in the AAmap function in basic_fun.h does not seem to work properly. The used function "toupper" returns and int. That number is just added (I guess to the memory address) of the constant " " string instead of concatenating the uppercase letter. Have a look at the attached file. AAmap1 mimics the original version, AAmap2 contains a possible fix.

test.cc.txt

kad-ecoli commented 4 years ago

Should be fixed with the above commit. Thank you for debugging the program.