diff -ur gmsh-2.3.1/Geo/GModelIO_Mesh.cpp gmsh-2.3.1.new/Geo/GModelIO_Mesh.cpp
--- gmsh-2.3.1/Geo/GModelIO_Mesh.cpp	2009-03-19 04:41:15.000000000 +0800
+++ gmsh-2.3.1.new/Geo/GModelIO_Mesh.cpp	2009-04-24 17:39:59.000000000 +0800
@@ -1500,7 +1500,7 @@
     fprintf(fp, " %d\n", numQuadrangles);
     for(fiter it = firstFace(); it != lastFace(); ++it){
       if(saveAll || (*it)->physicals.size()){
-        for(unsigned int i = 0; i < (*it)->triangles.size(); i++)
+        for(unsigned int i = 0; i < (*it)->quadrangles.size(); i++)
           (*it)->quadrangles[i]->writeMESH(fp, (*it)->tag());
       }
     }
