]> git.mxchange.org Git - flightgear.git/commitdiff
fix set command: allow strings to contain spaces
authormfranz <mfranz>
Mon, 19 Feb 2007 20:52:55 +0000 (20:52 +0000)
committermfranz <mfranz>
Mon, 19 Feb 2007 20:52:55 +0000 (20:52 +0000)
src/Network/props.cxx

index af23f44b399d294806c617488314976c4db5afeb..23472802016ba357aa84c3e6941db3013e8f12f8 100644 (file)
@@ -272,10 +272,10 @@ PropsChannel::foundTerminator()
        } else if ( command == "set" ) {
            if ( tokens.size() >= 2 ) {
                 string value, tmp;
-                if ( tokens.size() == 3 ) {
-                    value = tokens[2];
-                } else {
-                    value = "";
+                for (unsigned int i = 2; i < tokens.size(); i++) {
+                    if (i > 2)
+                        value += " ";
+                    value += tokens[i];
                 }
                 node->getNode( tokens[1].c_str(), true )
                     ->setStringValue(value.c_str());