git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45713
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
All:
- Fix bug in wxFileConfig when recreating a group (Steven Van Ingelgem)
All:
- Fix bug in wxFileConfig when recreating a group (Steven Van Ingelgem)
+- Account for lines without newline at the end in wxExecute()
wxTextInputStream tis(*is);
wxTextInputStream tis(*is);
- bool cont = true;
- while ( cont )
{
wxString line = tis.ReadLine();
{
wxString line = tis.ReadLine();
+
+ // check for EOF before other errors as it's not really an error
+ {
+ // add the last, possibly incomplete, line
+ if ( !line.empty() )
+ output.Add(line);
+ // any other error is fatal
- {
- cont = false;
- }
- else
- {
- output.Add(line);
- }
+ return false;
+
+ output.Add(line);
}
#endif // wxUSE_STREAMS
}
#endif // wxUSE_STREAMS