Fix gcc sprintf warnings
Gcc 9 has become more vocal with sprintf buffer overflow checking. Remove these sprintf warnings by changing the offending calls to a snprintf wrapper that will explicitly check the result.
This commit is contained in:
@@ -1514,7 +1514,8 @@ struct obj *obj;
|
||||
Strcat(what, " and ");
|
||||
Strcat(what, suit_simple_name(uarm));
|
||||
}
|
||||
Sprintf(why, " without taking off your %s first", what);
|
||||
Snprintf(why, sizeof(why), " without taking off your %s first",
|
||||
what);
|
||||
} else {
|
||||
Strcpy(why, "; it's embedded");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user