diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp
index 27b9b5e4efd8714b64dd5cfff80c6b5cade609e3..cc41aa32defb73a2f68b39fca3700336cca7f1a9 100644
--- a/Parser/Gmsh.tab.cpp
+++ b/Parser/Gmsh.tab.cpp
@@ -195,7 +195,7 @@
 
 #line 1 "Gmsh.y"
 
-// $Id: Gmsh.tab.cpp,v 1.217 2004-12-27 00:59:15 geuzaine Exp $
+// $Id: Gmsh.tab.cpp,v 1.218 2004-12-27 01:13:56 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -7017,8 +7017,8 @@ case 284:
 #line 2388 "Gmsh.y"
 {
       if(!strcmp(yyvsp[-2].c, "Empty") && !strcmp(yyvsp[-1].c, "Views")){
-	for(int i = 0; i < List_Nbr(CTX.post.list); i++){
-	  Post_View *v = *(Post_View **)List_Pointer_Test(CTX.post.list, i);
+	for(int i = List_Nbr(CTX.post.list) - 1; i >= 0; i--){
+	  Post_View *v = *(Post_View **) List_Pointer(CTX.post.list, i);
 	  if(v->empty())
 	    RemoveViewByIndex(i);
 	}
diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y
index e70c9a82e28f210236880b308f4d4ca38b06cb3b..160a6255ba1ada01fc677472835c51f04cd789db 100644
--- a/Parser/Gmsh.y
+++ b/Parser/Gmsh.y
@@ -1,5 +1,5 @@
 %{
-// $Id: Gmsh.y,v 1.189 2004-12-27 00:47:03 geuzaine Exp $
+// $Id: Gmsh.y,v 1.190 2004-12-27 01:13:57 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -2387,8 +2387,8 @@ Delete :
     | tDelete tSTRING tSTRING tEND
     {
       if(!strcmp($2, "Empty") && !strcmp($3, "Views")){
-	for(int i = 0; i < List_Nbr(CTX.post.list); i++){
-	  Post_View *v = *(Post_View **)List_Pointer_Test(CTX.post.list, i);
+	for(int i = List_Nbr(CTX.post.list) - 1; i >= 0; i--){
+	  Post_View *v = *(Post_View **) List_Pointer(CTX.post.list, i);
 	  if(v->empty())
 	    RemoveViewByIndex(i);
 	}
diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp
index a58b4ea1d7220de00e42f94549d6fcddae0cc3f5..4ca27190402942704d7510a91640321298ef4681 100644
--- a/Parser/Gmsh.yy.cpp
+++ b/Parser/Gmsh.yy.cpp
@@ -2,7 +2,7 @@
 /* A lexical scanner generated by flex */
 
 /* Scanner skeleton version:
- * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.216 2004-12-27 00:59:15 geuzaine Exp $
+ * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.217 2004-12-27 01:13:58 geuzaine Exp $
  */
 
 #define FLEX_SCANNER
@@ -1033,7 +1033,7 @@ char *yytext;
 #line 1 "Gmsh.l"
 #define INITIAL 0
 #line 2 "Gmsh.l"
-// $Id: Gmsh.yy.cpp,v 1.216 2004-12-27 00:59:15 geuzaine Exp $
+// $Id: Gmsh.yy.cpp,v 1.217 2004-12-27 01:13:58 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //