deal with maxfilelen < 0 case
This commit is contained in:
@@ -374,7 +374,7 @@ void log_error(code)
|
|||||||
oldend = end;
|
oldend = end;
|
||||||
end = strchr(oldend, ' ');
|
end = strchr(oldend, ' ');
|
||||||
|
|
||||||
if (end) {
|
if (maxlen > 0 && end) {
|
||||||
*end = '\0';
|
*end = '\0';
|
||||||
if (strlen(beg) > maxlen) {
|
if (strlen(beg) > maxlen) {
|
||||||
/* too far, need to back up & print the line */
|
/* too far, need to back up & print the line */
|
||||||
|
Reference in New Issue
Block a user