Fixed evaluation of attributes. Actually only attribute at the first level

* pattern.c: Fixed evaluation of attributes. Actually only
  attribute at the first level were evaluated (e.g. "@attr");
  expression like "foo/@attr" always failed.
diff --git a/ChangeLog b/ChangeLog
index db31770..c5aa488 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Jul  8 21:56:04 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+	* pattern.c: Fixed evaluation of attributes. Actually only
+	  attribute at the first level were evaluated (e.g. "@attr");
+	  expression like "foo/@attr" always failed.
+
 Fri Jul  8 20:04:29 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
 
 	* xmlschemas.c: tiny fix in xmlSchemaValidateStream() if a
diff --git a/pattern.c b/pattern.c
index 2438099..125e37c 100644
--- a/pattern.c
+++ b/pattern.c
@@ -1683,7 +1683,7 @@
 	    * Check for correct node-type.
 	    */
 	    if ((nodeType == XML_ATTRIBUTE_NODE) && 
-		((comp->steps[0].flags & XML_STREAM_STEP_ATTR) == 0))
+		((comp->steps[step].flags & XML_STREAM_STEP_ATTR) == 0))
 		goto next_state;
 	    /*
 	    * Compare local/namespace-name.