Changeset 56 in Thomson


Ignore:
Timestamp:
13/03/2015 07:49:21 (6 years ago)
Author:
pulkomandy
Message:

xk5: fix off-by-one error in snprintf length.

  • The length includes the string terminator, 8+3+1+1=13.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/xk5.c

    r47 r56  
    168168    clean_string (pc_ext);
    169169    *name = '\0';
    170     (void)snprintf (name, 12, "%s.%s", pc_name, pc_ext);
     170    (void)snprintf (name, 13, "%8s.%3s", pc_name, pc_ext);
    171171}
    172172
Note: See TracChangeset for help on using the changeset viewer.