added unescaping fixed-sized strings in BDCFF files
authorHolger Schemel <holger.schemel@virtion.de>
Fri, 15 Nov 2024 20:13:39 +0000 (21:13 +0100)
committerHolger Schemel <holger.schemel@virtion.de>
Fri, 15 Nov 2024 20:16:17 +0000 (21:16 +0100)
src/game_bd/bd_bdcff.c

index 1145671441d089fd4346a26b8cb28845f95f8e1e..e170cdceb8028e737df0b0bc15fdc3c5579827b4 100644 (file)
@@ -175,7 +175,10 @@ static boolean struct_set_property(void *str, const GdStructDescriptor *prop_des
       if (prop_desc[i].type == GD_TYPE_STRING)
       {
        // strings are treated different, as occupy the whole length of the line
-       gd_strcpy(value, param);
+       char *str = getUnescapedString(param);
+
+       gd_strcpy(value, str);
+       checked_free(str);
 
        // remember this to skip checking the number of parameters at the end of the function
        was_string = TRUE;