Changeset 5b27b9f in thomson


Ignore:
Timestamp:
Mar 13, 2015, 7:49:21 AM (9 years ago)
Author:
Adrien Destugues <pulkomandy@…>
Branches:
main
Children:
2ee52fb
Parents:
c552dd6
Message:

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

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

git-svn-id: svn://localhost/thomson@56 85ae3b6b-dc8f-4344-a89d-598714f2e4e5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/xk5.c

    rc552dd6 r5b27b9f  
    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.