--- freem/src/routine.c 2025/04/09 19:52:02 1.5 +++ freem/src/routine.c 2025/04/13 04:22:43 1.6 @@ -1,5 +1,5 @@ /* - * $Id: routine.c,v 1.5 2025/04/09 19:52:02 snw Exp $ + * $Id: routine.c,v 1.6 2025/04/13 04:22:43 snw Exp $ * Routine buffer management * * @@ -24,6 +24,9 @@ * along with FreeM. If not, see . * * $Log: routine.c,v $ + * Revision 1.6 2025/04/13 04:22:43 snw + * Fix snprintf calls + * * Revision 1.5 2025/04/09 19:52:02 snw * Eliminate as many warnings as possible while building with -Wall * @@ -259,7 +262,7 @@ short rtn_get_path(char *rou, char *buf) stcnv_m2c (pth); } - snprintf (buf, PATHLEN, "%s/%s.m", pth, rou); + snprintf (buf, PATHLEN - 1, "%s/%s.m", pth, rou); if ((fp = fopen (buf, "r")) != NULL) { (void) fclose (fp);