aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/scanner.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/scanner.c b/src/scanner.c
index 406519f..3f79a44 100644
--- a/src/scanner.c
+++ b/src/scanner.c
@@ -612,10 +612,11 @@ start_element(void *data, const char *element_name, const char **atts)
for (i = 0; atts[i]; i += 2) {
if (strcmp(atts[i], "name") == 0)
name = atts[i + 1];
- if (strcmp(atts[i], "version") == 0)
+ if (strcmp(atts[i], "version") == 0) {
version = strtouint(atts[i + 1]);
if (version == -1)
fail(&ctx->loc, "wrong version (%s)", atts[i + 1]);
+ }
if (strcmp(atts[i], "type") == 0)
type = atts[i + 1];
if (strcmp(atts[i], "value") == 0)