aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcount_nucleobases.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/count_nucleobases.c b/count_nucleobases.c
index c2aafe5..3fd6aec 100755
--- a/count_nucleobases.c
+++ b/count_nucleobases.c
@@ -25,7 +25,7 @@ int main(int argc, char **argv) {
while ((read = getline(&line, &len, fh)) != -1) {
if(line[0] != '>') {
unsigned int i = 0;
- for(i = 0; i < strlen(line); i++) {
+ for(i = 0; i < read; i++) {
counts[line[i]]++;
}
}