X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fmisc.c;h=e5cdfe26da8efec03bb294f2c2218c7081074b01;hb=b8ccb648b89e24b27f8a60e2d8e9a4680322bd86;hp=b6ec4fda6353c2494c1c15f0eeca311ea6733887;hpb=5a5342a6ab48037839b783adc4f3304331834a8c;p=rocksndiamonds.git diff --git a/src/libgame/misc.c b/src/libgame/misc.c index b6ec4fda..e5cdfe26 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -429,6 +429,7 @@ char *getPath2(char *path1, char *path2) strlen(path2) + 1); sprintf(complete_path, "%s/%s", path1, path2); + return complete_path; } @@ -439,6 +440,7 @@ char *getPath3(char *path1, char *path2, char *path3) strlen(path3) + 1); sprintf(complete_path, "%s/%s/%s", path1, path2, path3); + return complete_path; } @@ -447,6 +449,7 @@ char *getStringCat2(char *s1, char *s2) char *complete_string = checked_malloc(strlen(s1) + strlen(s2) + 1); sprintf(complete_string, "%s%s", s1, s2); + return complete_string; } @@ -458,8 +461,8 @@ char *getStringCopy(char *s) return NULL; s_copy = checked_malloc(strlen(s) + 1); - strcpy(s_copy, s); + return s_copy; } @@ -1591,6 +1594,7 @@ static void FreeCustomArtworkList(struct ArtworkListInfo *, struct FileInfo *getFileListFromConfigList(struct ConfigInfo *config_list, struct ConfigInfo *suffix_list, + char **ignore_tokens, int num_file_list_entries) { struct FileInfo *file_list; @@ -1651,9 +1655,9 @@ struct FileInfo *getFileListFromConfigList(struct ConfigInfo *config_list, } /* the following tokens are no file definitions, but other config tokens */ - if (strcmp(config_list[i].token, "global.num_toons") == 0 || - strcmp(config_list[i].token, "menu.main.hide_static_text") == 0) - is_file_entry = FALSE; + for (j=0; ignore_tokens[j] != NULL; j++) + if (strcmp(config_list[i].token, ignore_tokens[j]) == 0) + is_file_entry = FALSE; if (is_file_entry) {