From 48d44a13e525375ef289ef577e5fc6abf1735e19 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Wed, 1 Feb 2012 22:38:50 +0100 Subject: Clear the gid flags before processing them Also read the gids as unsigned integers since that's how Tiled writes them to prevent the number going negative when the highest flag is used. Reviewed-by: Yohann Ferreira --- src/utils/xml.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils/xml.cpp') diff --git a/src/utils/xml.cpp b/src/utils/xml.cpp index 5d579ddc..91ebb446 100644 --- a/src/utils/xml.cpp +++ b/src/utils/xml.cpp @@ -97,7 +97,7 @@ namespace XML xmlChar *prop = xmlGetProp(node, BAD_CAST name); if (prop) { - ret = atoi((char*) prop); + ret = atol((char*) prop); xmlFree(prop); } -- cgit v1.2.3-70-g09d2