diff options
author | Aaron Ball <nullspoon@iohq.net> | 2016-11-28 14:13:01 -0700 |
---|---|---|
committer | Aaron Ball <nullspoon@iohq.net> | 2016-11-28 14:13:09 -0700 |
commit | 6aeb106de30e9c5438891732f9dbebdee1d19d93 (patch) | |
tree | d73c41330f1cd6110c4d06d89279abfc7d8d13e5 | |
parent | 41107e2458522a66805ba00428cb42bfea3cce41 (diff) | |
parent | 04d1d6ae25852942386ba159556cee7fd8115317 (diff) | |
download | palindrome_finder-6aeb106de30e9c5438891732f9dbebdee1d19d93.tar.gz palindrome_finder-6aeb106de30e9c5438891732f9dbebdee1d19d93.tar.xz |
Merge branch 'expand-capacity'
Signed-off-by: Aaron Ball <nullspoon@iohq.net>
-rw-r--r-- | src/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -138,7 +138,7 @@ int main(int argc, char *argv[]) { printf("Allocating memory\n"); // Allocate array for file contents - char data[flen + 1]; + char* data = malloc(flen + 1); unsigned int i = 0; char c; printf("Reading data to memory\n"); @@ -150,6 +150,9 @@ int main(int argc, char *argv[]) { fclose(f); printf("Searching for palindromes\n"); + + find_largest_palindromes(data); + free(data); return 0; } |