Commits

Anonymous committed 4f04c32

minor bugfix in RelaxNG validation code introduced while adding structured errors support

Comments (0)

Files changed (1)

         xmlRelaxNGFreeValidCtxt( vctxt );
 
         LibXML_report_error(saved_error, 0);
-        if (RETVAL>1) {
-	  /* not valid, although libxml2 gave no reason */
-          croak( "validation failed for unknown reason\n" );
-          XSRETURN_UNDEF;
+        if ( RETVAL > 0 ) {
+	    /* not valid, although libxml2 gave no reason */
+            croak( "validation failed for unknown reason\n" );
+            XSRETURN_UNDEF;
         }
         if ( RETVAL == -1 ) {
             croak( "API Error" );
 
         LibXML_report_error(saved_error, 0);
         if ( RETVAL > 0 ) {
+	    /* not valid, although libxml2 gave no reason */
             croak( "validation failed for unknown reason\n" );
             XSRETURN_UNDEF;
         }