Add Strlen(), a strlen(3) that panics if string is stupid long and returns unsigned.

First batch of changes to use it to suppress warnings.
This commit is contained in:
nhkeni
2022-03-06 20:23:04 -05:00
parent 1e31fee0df
commit ff1289e828
16 changed files with 45 additions and 32 deletions

View File

@@ -176,9 +176,10 @@ eatmupdate(void)
if (altmsg) {
/* replace end-of-mimicking message */
if (strlen(altmsg) > strlen(g.eatmbuf)) {
int amlen = Strlen(altmsg);
if (amlen > Strlen(g.eatmbuf)) {
free((genericptr_t) g.eatmbuf);
g.eatmbuf = (char *) alloc(strlen(altmsg) + 1);
g.eatmbuf = (char *) alloc(amlen + 1);
}
g.nomovemsg = strcpy(g.eatmbuf, altmsg);
/* update current image */