Commit c0d43fd5 by Rudolf

Fix EOF removal

No need to allocate +1 now.
parent 750a7ab1
Showing with 1 additions and 1 deletions
......@@ -47,7 +47,7 @@ struct tree *create_tree(FILE *file)
freq[c]++;
}
struct tree **forest = malloc((charcount + 1) * sizeof(struct tree));
struct tree **forest = malloc((charcount) * sizeof(struct tree));
/* Create empty forest - whoah */
int ntrees = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment