From: mfranz Date: Wed, 25 Jul 2007 15:17:06 +0000 (+0000) Subject: Nick "Lethe" WARNE: prevent crash caused by improper use of --multiplay X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b0bb63bf79debf3eb48fd4b21e65a2e9685f82fd;p=flightgear.git Nick "Lethe" WARNE: prevent crash caused by improper use of --multiplay mf: stripped down the log message a bit :-) --- diff --git a/src/Main/fg_io.cxx b/src/Main/fg_io.cxx index 134087885..82bcfeb35 100644 --- a/src/Main/fg_io.cxx +++ b/src/Main/fg_io.cxx @@ -187,8 +187,12 @@ FGIO::parse_port_config( const string& config ) else if (tokens[1] == "file") n--; FGGeneric *generic = new FGGeneric( tokens[n] ); io = generic; - } else if ( protocol == "multiplay" ) {\ - //Determine dir, rate, host & port + } else if ( protocol == "multiplay" ) { + if ( tokens.size() != 5 ) { + SG_LOG( SG_IO, SG_ALERT, "Ignoring invalid --multiplay option " + "(4 arguments expected: --multiplay=dir,hz,hostname,port)" ); + return NULL; + } string dir = tokens[1]; string rate = tokens[2]; string host = tokens[3];