• AVR Freaks

Hot!MPLAB X 5.00 sprintf broken after upgrade

Author
jtzeng
Super Member
  • Total Posts : 444
  • Reward points : 0
  • Joined: 2003/11/07 12:42:20
  • Status: offline
2018/08/06 21:15:07 (permalink)
0

MPLAB X 5.00 sprintf broken after upgrade

Using MPLAB X 4.20 ans XC16 1.34 all sprintf were working fine.
Now that I updated to MPLAB X 5.00 the sprintf will add a 0x00 when a %01d is called for.
For:      sprintf(&tmp_buff[0],"\rBottle: %01d\r",id);
I get:
tmp_buff[0]    char    0x9D6    \r; 0xd    
tmp_buff[1]    char    0x9D7    'B'; 0x42    
tmp_buff[2]    char    0x9D8    'o'; 0x6f    
tmp_buff[3]    char    0x9D9    't'; 0x74    
tmp_buff[4]    char    0x9DA    't'; 0x74    
tmp_buff[5]    char    0x9DB    'l'; 0x6c    
tmp_buff[6]    char    0x9DC    'e'; 0x65    
tmp_buff[7]    char    0x9DD    ':'; 0x3a    
tmp_buff[8]    char    0x9DE    ' '; 0x20    
tmp_buff[9]    char    0x9DF    NUL; 0x0   <L-------- Error.........  
tmp_buff[10]    char    0x9E0    \r; 0xd    This is happening for all sprintf that have any % conversion.

John Zigrang
JTZ Engineering, Inc.
#1

13 Replies Related Threads

    Jump to:
    © 2019 APG vNext Commercial Version 4.5