@@ -247,17 +247,8 @@ Properties::init(tistream& input)
247247 // Remove trailing 'Windows' \r.
248248 buffer.resize (buffLen - 1 );
249249
250- tstring::size_type const idx = buffer.find (LOG4CPLUS_TEXT (' =' ));
251- if (idx != tstring::npos)
252- {
253- tstring key = buffer.substr (0 , idx);
254- tstring value = buffer.substr (idx + 1 );
255- trim_trailing_ws (key);
256- trim_ws (value);
257- setProperty (key, value);
258- }
259- else if (buffer.compare (0 , 7 , LOG4CPLUS_TEXT (" include" )) == 0
260- && buffer.size () >= 7 + 1 + 1
250+ if (buffer.size () >= 7 + 1 + 1
251+ && buffer.compare (0 , 7 , LOG4CPLUS_TEXT (" include" )) == 0
261252 && is_space (buffer[7 ]))
262253 {
263254 tstring included (buffer, 8 ) ;
@@ -274,6 +265,18 @@ Properties::init(tistream& input)
274265
275266 init (file);
276267 }
268+ else
269+ {
270+ tstring::size_type const idx = buffer.find (LOG4CPLUS_TEXT (' =' ));
271+ if (idx != tstring::npos)
272+ {
273+ tstring key = buffer.substr (0 , idx);
274+ tstring value = buffer.substr (idx + 1 );
275+ trim_trailing_ws (key);
276+ trim_ws (value);
277+ setProperty (key, value);
278+ }
279+ }
277280 }
278281}
279282
0 commit comments