Browse Source

Merge pull request #8315 from thinkyhead/bf1_sprintf_p_fix

[1.1] Patch abuse of sprintf_P in G33
Scott Lahteine 7 years ago
parent
commit
2fb35f7991
No account linked to committer's email address
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      Marlin/Marlin_main.cpp

+ 4
- 4
Marlin/Marlin_main.cpp View File

6063
               }
6063
               }
6064
             SERIAL_EOL();
6064
             SERIAL_EOL();
6065
             char mess[21];
6065
             char mess[21];
6066
-            sprintf_P(mess, PSTR("Calibration sd:"));
6066
+            strcpy_P(mess, PSTR("Calibration sd:"));
6067
             if (zero_std_dev_min < 1)
6067
             if (zero_std_dev_min < 1)
6068
               sprintf_P(&mess[15], PSTR("0.%03i"), (int)round(zero_std_dev_min * 1000.0));
6068
               sprintf_P(&mess[15], PSTR("0.%03i"), (int)round(zero_std_dev_min * 1000.0));
6069
             else
6069
             else
6078
             if (iterations < 31)
6078
             if (iterations < 31)
6079
               sprintf_P(mess, PSTR("Iteration : %02i"), (int)iterations);
6079
               sprintf_P(mess, PSTR("Iteration : %02i"), (int)iterations);
6080
             else
6080
             else
6081
-              sprintf_P(mess, PSTR("No convergence"));
6081
+              strcpy_P(mess, PSTR("No convergence"));
6082
             SERIAL_PROTOCOL(mess);
6082
             SERIAL_PROTOCOL(mess);
6083
             SERIAL_PROTOCOL_SP(32);
6083
             SERIAL_PROTOCOL_SP(32);
6084
             SERIAL_PROTOCOLPGM("std dev:");
6084
             SERIAL_PROTOCOLPGM("std dev:");
6097
           SERIAL_EOL();
6097
           SERIAL_EOL();
6098
 
6098
 
6099
           char mess[21];
6099
           char mess[21];
6100
-          sprintf_P(mess, enddryrun);
6101
-          sprintf_P(&mess[11], PSTR(" sd:"));
6100
+          strcpy_P(mess, enddryrun);
6101
+          strcpy_P(&mess[11], PSTR(" sd:"));
6102
           if (zero_std_dev < 1)
6102
           if (zero_std_dev < 1)
6103
             sprintf_P(&mess[15], PSTR("0.%03i"), (int)round(zero_std_dev * 1000.0));
6103
             sprintf_P(&mess[15], PSTR("0.%03i"), (int)round(zero_std_dev * 1000.0));
6104
           else
6104
           else

Loading…
Cancel
Save