From 648de725215fd750ccc5607a1f40f6d656d813f7 Mon Sep 17 00:00:00 2001 From: Dm1tr1y147 Date: Sun, 19 Jul 2020 11:57:00 +0500 Subject: [PATCH] Fixed infinity loop in history file lines count on some devices --- src/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.c b/src/utils.c index 7320792..3936815 100644 --- a/src/utils.c +++ b/src/utils.c @@ -201,7 +201,7 @@ char *get_curr_dir_name() int get_num_of_lines(FILE *file) { int n = 0; - char ch, pch; + int ch, pch; long curr_pos = ftell(file); fseek(file, 0, SEEK_SET); @@ -244,4 +244,4 @@ bool str_is_in_arr(char **arr, size_t sz, char *str) } return false; -} \ No newline at end of file +}