X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=opts.c;h=fd10233ef0e1d2f2a5812dfff332cf7f252ed53b;hp=27d6a560473ead2f183a8adbeffc95c3fd470901;hb=12a864abf5a5cc79f0a8f11535c26bb2009c0ad9;hpb=90824c209329d73b9bdad86177348d18562891ab diff --git a/opts.c b/opts.c index 27d6a56..fd10233 100644 --- a/opts.c +++ b/opts.c @@ -25,6 +25,7 @@ #include #include "gmqcc.h" +#include "platform.h" const unsigned int opts_opt_oflag[COUNT_OPTIMIZATIONS+1] = { # define GMQCC_TYPE_OPTIMIZATIONS @@ -251,7 +252,7 @@ static size_t opts_ini_parse ( /* section found */ if (*(parse_end = opts_ini_next(parse_beg + 1, ']')) == ']') { * parse_end = '\0'; /* terminate bro */ - util_strncpy(section_data, parse_beg + 1, sizeof(section_data)); + platform_strncpy(section_data, parse_beg + 1, sizeof(section_data)); section_data[sizeof(section_data) - 1] = '\0'; *oldname_data = '\0'; } else if (!error) { @@ -272,7 +273,7 @@ static size_t opts_ini_parse ( opts_ini_rstrip(read_value); /* valid name value pair, lets call down to handler */ - util_strncpy(oldname_data, read_name, sizeof(oldname_data)); + platform_strncpy(oldname_data, read_name, sizeof(oldname_data)); oldname_data[sizeof(oldname_data) - 1] ='\0'; if ((*errorhandle = loadhandle(section_data, read_name, read_value)) && !error)