Skip to content

Instantly share code, notes, and snippets.

@nickgarvey
Created July 9, 2014 06:19
Show Gist options
  • Save nickgarvey/f4f53434be8a27b0b89d to your computer and use it in GitHub Desktop.
Save nickgarvey/f4f53434be8a27b0b89d to your computer and use it in GitHub Desktop.
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