X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_bd%2Fbd_bdcff.c;h=06e5e06ba2ae607c43ff4852e18c682db76e31c1;hb=1f0d80712e543e4d664ffe9a1f672db34207e7b9;hp=235938b723c3e0d56e21a3cf4a0dc2b852db35bc;hpb=1b947aa0ce6030688a3c6cf514a7661f4e64784c;p=rocksndiamonds.git diff --git a/src/game_bd/bd_bdcff.c b/src/game_bd/bd_bdcff.c index 235938b7..06e5e06b 100644 --- a/src/game_bd/bd_bdcff.c +++ b/src/game_bd/bd_bdcff.c @@ -107,17 +107,17 @@ static boolean attrib_is_valid_for_cave(const char *attrib) int i; /* bdcff engine flag............ */ - if (strcasecmp(attrib, "Engine")==0) + if (strcasecmp(attrib, "Engine") == 0) return TRUE; /* old flags - for compatibility */ - if (strcasecmp(attrib, "BD1Scheduling")==0) + if (strcasecmp(attrib, "BD1Scheduling") == 0) return TRUE; - if (strcasecmp(attrib, "SnapExplosions")==0) + if (strcasecmp(attrib, "SnapExplosions") == 0) return TRUE; - if (strcasecmp(attrib, "AmoebaProperties")==0) + if (strcasecmp(attrib, "AmoebaProperties") == 0) return TRUE; /* search in property database */ @@ -188,12 +188,10 @@ static boolean struct_set_property(gpointer str, const GdStructDescriptor *prop_ if (prop_desc[i].type == GD_TYPE_LONGSTRING) { - GString *str = *(GString **)value; - char *compressed; + char **str = (char **)value; - compressed = getUnescapedString(param); - g_string_assign(str, compressed); - free(compressed); + checked_free(*str); + *str = getUnescapedString(param); /* remember this to skip checking the number of parameters at the end of the function */ was_string = TRUE;