comparison mcabber/mcabber/histolog.c @ 2182:09508eeb81dc

Fix reading of history log files w/o LF character (Sam Whited)
author Mikael Berthe <mikael@lilotux.net>
date Sat, 05 Sep 2015 18:28:12 +0200
parents 990cad5123f3
children 1177b33d4550
comparison
equal deleted inserted replaced
2181:bc10fc4eced7 2182:09508eeb81dc
225 225
226 if (fgets(data, data_size-1, fp) == NULL) 226 if (fgets(data, data_size-1, fp) == NULL)
227 break; 227 break;
228 ln++; 228 ln++;
229 229
230 while (1) { 230 while (!feof(fp)) {
231 for (tail = data; *tail; tail++) ; 231 for (tail = data; *tail; tail++) ;
232 if (tail == data) { 232 if (tail == data) {
233 // That would happen if the log file has NUL characters... 233 // That would happen if the log file has NUL characters...
234 scr_LogPrint(LPRINT_LOGNORM, "Corrupted history file! Trying to recover."); 234 scr_LogPrint(LPRINT_LOGNORM, "Corrupted history file! Trying to recover.");
235 err = 1; 235 err = 1;