X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=opts.c;h=77aa9c06e02c07fad5916386470f98fab7ad0683;hp=c2e019e28a9ff932bf060c93de7412de2050e832;hb=d4b0e1f588cb033cd4400cde4bbc4357c1776f94;hpb=160e7cf7eebd7fa173fb739aca00143097a3518b diff --git a/opts.c b/opts.c index c2e019e..77aa9c0 100644 --- a/opts.c +++ b/opts.c @@ -216,7 +216,7 @@ static size_t opts_ini_parse ( /* section found */ if (*(parse_end = opts_ini_next(parse_beg + 1, ']')) == ']') { * parse_end = '\0'; /* terminate bro */ - strncpy(section_data, parse_beg + 1, sizeof(section_data)); + util_strncpy(section_data, parse_beg + 1, sizeof(section_data)); section_data[sizeof(section_data) - 1] = '\0'; *oldname_data = '\0'; } else if (!error) { @@ -237,7 +237,7 @@ static size_t opts_ini_parse ( opts_ini_rstrip(read_value); /* valid name value pair, lets call down to handler */ - strncpy(oldname_data, read_name, sizeof(oldname_data)); + util_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)