summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/map.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/map.c b/src/map.c
index fdb2456..7eb4ddb 100644
--- a/src/map.c
+++ b/src/map.c
@@ -404,6 +404,8 @@ _db_tmx_object_property_start(void *pv, const char *name, const char **attr)
struct db_map *map;
char *p_name;
char *p_type;
+ int s_i;
+ float s_f;
char *dir;
db_dbg(" <%s> (property)", name);
@@ -421,10 +423,12 @@ _db_tmx_object_property_start(void *pv, const char *name, const char **attr)
db_xml_get_string_attr(p, attr, "type", &p_type, 1);
if (strcmp(p_type, "int") == 0) {
db_xml_get_int_attr(p, attr, "value",
- (int *) &map->obj_s, 1);
+ &s_i, 1);
+ map->obj_s = s_i;
} else if (strcmp(p_type, "float") == 0) {
db_xml_get_float_attr(p, attr, "value",
- (float *) &map->obj_s, 1);
+ &s_f, 1);
+ map->obj_s = s_f;
} else {
db_err("Object speed must be an integer or "
"float");