#include <stdlib.h> // atof(), atoi()
#include <strings.h> // memchr()
+#include <ctype.h> // isspace()
#include <simgear/constants.h>
#include <simgear/debug/logstream.hxx>
line = tmp;
SG_LOG( SG_GENERAL, SG_BULK, "-> '" << line << "'" );
- if ( !line.size() )
+ if ( !line.size() || isspace(tmp[0]))
continue;
if (line.size() > 3) {
// which is the version and copyright information
in.getline(tmp, 2048);
// vector<string> vers_token = simgear::strutils::split( tmp );
- if ( strnlen(tmp, 2048) > 4 ) {
+ if ( strlen(tmp) > 4 ) {
char *p = (char *)memchr(tmp, ' ', 4);
if ( p )
*p = 0;