]> git.mxchange.org Git - simgear.git/blobdiff - simgear/props/props.cxx
Don't reset the random texture base when rebuilding a cloud layer
[simgear.git] / simgear / props / props.cxx
index c198ee1720369124aebeac0d157c590548d01930..aa37f1db2083605edab681d550a728bbace844d3 100644 (file)
@@ -116,7 +116,7 @@ parse_name (const string &path, int &i)
       name = ".";
     }
     if (i < max && path[i] != '/')
-      throw string("Illegal character after " + name);
+      throw string("illegal character after " + name);
   }
 
   else if (isalpha(path[i]) || path[i] == '_') {
@@ -295,7 +295,7 @@ find_node (SGPropertyNode * current,
   else if (components[position].name == "..") {
     SGPropertyNode * parent = current->getParent();
     if (parent == 0)
-      throw string("Attempt to move past root with '..'");
+      throw string("attempt to move past root with '..'");
     else
       return find_node(parent, components, position + 1, create);
   }
@@ -599,7 +599,7 @@ SGPropertyNode::trace_write () const
        << make_string() << '"' << endl;
 #else
   SG_LOG(SG_GENERAL, SG_ALERT, "TRACE: Write node " << getPath()
-        << ", value\"" << make_string() << '"');
+        << ", value \"" << make_string() << '"');
 #endif
 }
 
@@ -739,7 +739,11 @@ SGPropertyNode::SGPropertyNode (const char * name,
     _attr(READ|WRITE),
     _listeners(0)
 {
-  _name = name;
+  int i = 0;
+  _name = parse_name(name, i);
+  if (i != int(strlen(name)) || name[0] == '.')
+    throw string("plain name expected instead of '") + name + '\'';
+
   _local_val.string_val = 0;
 }