fix: change word_count_per_sentence type from uint to ulonglong in analyze function to prevent overflow on large text inputs

This commit is contained in:
2024-11-29 06:25:09 +00:00
parent 0582fd8667
commit baa1ffe9c2
2 changed files with 1 additions and 1 deletions
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -321,7 +321,7 @@ void analyze(FILE *f) {
stra(all, sbuf);
free(sbuf);
strd(all);
uint word_count_per_sentence = words->count / sentences->count;
ulonglong word_count_per_sentence = words->count / sentences->count;
printf("Word count per sentence: %llu\n", word_count_per_sentence);
slf(capitalized_words);