Created
July 9, 2014 06:19
-
-
Save nickgarvey/f4f53434be8a27b0b89d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/prot/rnaTranslation.c b/prot/rnaTranslation.c | |
index cb89e33..4eb6dbc 100644 | |
--- a/prot/rnaTranslation.c | |
+++ b/prot/rnaTranslation.c | |
@@ -13,10 +13,10 @@ struct dict{ | |
char lookup_codon(struct dict dictionary[CODON_DICT_SIZE], char * search_term) | |
{ | |
int i; | |
- char result; | |
+ char result = 'X'; | |
for(i = 0; i < CODON_DICT_SIZE; i++) | |
{ | |
- if(dictionary[i].key == search_term) | |
+ if (!strcmp(dictionary[i].key, search_term)) | |
{ | |
result = *dictionary[i].value; | |
break; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment