Diff for /freem/src/cmd_map.c between versions 1.4 and 1.5

version 1.4, 2025/04/09 19:52:02 version 1.5, 2025/04/13 04:22:43
Line 24 Line 24
  *   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.   *   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.
  *   *
  *   $Log$   *   $Log$
    *   Revision 1.5  2025/04/13 04:22:43  snw
    *   Fix snprintf calls
    *
  *   Revision 1.4  2025/04/09 19:52:02  snw   *   Revision 1.4  2025/04/09 19:52:02  snw
  *   Eliminate as many warnings as possible while building with -Wall   *   Eliminate as many warnings as possible while building with -Wall
  *   *
Line 42 Line 45
   
 MRESULT cmd_map(MACTION *ra)  MRESULT cmd_map(MACTION *ra)
 {  {
     char mapping_obj[256];      char mapping_obj[STRLEN];
     char mapping_ns[256];      char mapping_ns[STRLEN];
     char tmp_key[256];      char tmp_key[STRLEN];
           
     if (rtn_dialect () != D_FREEM) {      if (rtn_dialect () != D_FREEM) {
         return NOSTAND;          return NOSTAND;
Line 81  MRESULT cmd_map(MACTION *ra) Line 84  MRESULT cmd_map(MACTION *ra)
           
     stcpy (mapping_ns, argptr);                     stcpy (mapping_ns, argptr);               
           
     snprintf (tmp_key, 255, "^$SYSTEM\202MAPPINGS\202GLOBAL\202%s\201", mapping_obj);      snprintf (tmp_key, STRLEN - 1, "^$SYSTEM\202MAPPINGS\202GLOBAL\202%s\201", mapping_obj);
     global (set_sym, tmp_key, mapping_ns);      global (set_sym, tmp_key, mapping_ns);
   
     *ra = RA_CONTINUE;      *ra = RA_CONTINUE;

Removed from v.1.4  
changed lines
  Added in v.1.5


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>