[PATCH wayland 1/2] scanner: Fix wrong restriction on since field

Ander Conselvan de Oliveira ander.conselvan.de.oliveira at intel.com
Tue Nov 27 07:03:40 PST 2012


The scanner would not allow two consecutive requests on an interface to
have the same since number, so if a new version of an interface added
two new request the version number would have to be increased by two.
---
 src/scanner.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/scanner.c b/src/scanner.c
index 5793c20..6d2eddd 100644
--- a/src/scanner.c
+++ b/src/scanner.c
@@ -356,7 +356,7 @@ start_element(void *data, const char *element_name, const char **atts)
 			version = strtol(since, &end, 0);
 			if (errno == EINVAL || end == since || *end != '\0')
 				fail(ctx, "invalid integer\n");
-			if (version <= ctx->interface->since)
+			if (version < ctx->interface->since)
 				fail(ctx, "since version not increasing\n");
 			ctx->interface->since = version;
 		}
-- 
1.7.10.4



More information about the wayland-devel mailing list