X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=opts.c;h=77aa9c06e02c07fad5916386470f98fab7ad0683;hp=c2e019e28a9ff932bf060c93de7412de2050e832;hb=1e9d3e43cb17c3518eb6371a3b3ba37453c1bc4a;hpb=685fa54daf0b3fdd92d9424e7fcab1ded9fb3c29 diff --git a/opts.c b/opts.c old mode 100644 new mode 100755 index c2e019e..77aa9c0 --- 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)