Add and use Strlen(), like strlen() but panics on unreasonably long strings.

This commit is contained in:
nhkeni
2022-03-16 21:42:00 -04:00
parent ff1289e828
commit 1151d54500
11 changed files with 26 additions and 24 deletions
+1 -1
View File
@@ -706,7 +706,7 @@ migr_booty_item(int otyp, const char* gang)
otmp = mksobj_migr_to_species(otyp, (unsigned long) M2_ORC, TRUE, FALSE);
if (otmp && gang) {
new_oname(otmp, strlen(gang) + 1); /* removes old name if present */
new_oname(otmp, Strlen(gang) + 1); /* removes old name if present */
Strcpy(ONAME(otmp), gang);
if (objects[otyp].oc_class == FOOD_CLASS) {
if (otyp == SLIME_MOLD)