1 2 3 Previous Next 35 Replies Latest reply on Sep 2, 2016 1:58 AM by user_1377889

    sprintf bug in PSoC Creator 3 with 5LP and format %f

    user_95857601
              Very simple program to test sprintf. This work wiith Creator 2.2 not in Creator 3 with %f as format. Put a breahpoint after the line sprintf and look the string strMsg1. You must see Testing: 12.35 and I see : Testing : then \0. Where is the bug ??? #include        #include          void testSprintf(void) { char strMsg1[21]; sprintf(strMsg1,"Testing:%f",(float)12.35); } int main() { testSprintf(); for(;;) { } }        
        1 2 3 Previous Next