]> git.mxchange.org Git - flightgear.git/commitdiff
Oops, fixed a bug introduced in the previous round that munged many
authorcurt <curt>
Tue, 12 Jun 2001 22:24:52 +0000 (22:24 +0000)
committercurt <curt>
Tue, 12 Jun 2001 22:24:52 +0000 (22:24 +0000)
runway textures.

src/Objects/matlib.cxx
src/Objects/newmat.cxx

index 55a6b25dbeb597d00208f3a87b22429402e7748e..6c8cf6b7ff9761ea2d10121a72a2aae42a18b0c2 100644 (file)
@@ -130,8 +130,14 @@ bool FGMaterialLib::load( const string& mpath ) {
            in >> token;
 
            if ( token == '{' ) {
+                // Read the data into a temporary but stack allocated
+                // copy of the structure
+                FGNewMat tmp;
+               in >> tmp;
+
+                // create a pointer to a heap allocated copy of the structure
                FGNewMat *m = new FGNewMat;
-               in >> *m;
+                *m = tmp;
 
                // build the ssgSimpleState
                SGPath tex_path( globals->get_fg_root() );
index 2fa702d61907d1ef04880f359ab9ff09a9a5c128..1e917524d5cca22bb943b27d66d9297515a269ba 100644 (file)
@@ -200,7 +200,6 @@ void FGNewMat::dump_info () {
 FGNewMat::~FGNewMat ( void ) {
 }
 
-
 istream&
 operator >> ( istream& in, FGNewMat& m )
 {