--- libaitcfg/src/parse.c 2023/01/23 23:24:22 1.20.2.2 +++ libaitcfg/src/parse.c 2025/08/19 11:43:53 1.22 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: parse.c,v 1.20.2.2 2023/01/23 23:24:22 misho Exp $ +* $Id: parse.c,v 1.22 2025/08/19 11:43:53 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004 - 2023 +Copyright 2004 - 2025 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -77,8 +77,14 @@ cfgReadConfig(FILE *f, cfg_root_t * __restrict cfg) break; #endif if (!(psAttr = strpbrk(line, "\r\n"))) { - /* skip line, too long */ - continue; + if (feof(f) && strlen(line) > 0) { + /* last line without end of line */ + strlcpy(origin, line, sizeof origin); + str_Trim(line); + } else { + /* skip line, too long */ + continue; + } } else { *psAttr = 0; strlcpy(origin, line, sizeof origin);