summaryrefslogtreecommitdiff
path: root/main/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/config.c')
-rw-r--r--main/config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/config.c b/main/config.c
index 118b9586e..8107fce04 100644
--- a/main/config.c
+++ b/main/config.c
@@ -2195,10 +2195,10 @@ static struct ast_config *config_text_file_load(const char *database, const char
lineno++;
if (fgets(buf, sizeof(buf), f)) {
/* Skip lines that are too long */
- if (strlen(buf) == sizeof(buf) - 1 && buf[sizeof(buf) - 1] != '\n') {
+ if (strlen(buf) == sizeof(buf) - 1 && buf[sizeof(buf) - 2] != '\n') {
ast_log(LOG_WARNING, "Line %d too long, skipping. It begins with: %.32s...\n", lineno, buf);
while (fgets(buf, sizeof(buf), f)) {
- if (strlen(buf) != sizeof(buf) - 1 || buf[sizeof(buf) - 1] == '\n') {
+ if (strlen(buf) != sizeof(buf) - 1 || buf[sizeof(buf) - 2] == '\n') {
break;
}
}