소스 검색

Merge pull request #8314 from thinkyhead/bf2_sprintf_p_fix

[2.0] Patch abuse of sprintf_P in G33
Scott Lahteine 7 년 전
부모
커밋
a34b5a2bfa
No account linked to committer's email address
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4
    4
      Marlin/src/gcode/calibrate/G33.cpp

+ 4
- 4
Marlin/src/gcode/calibrate/G33.cpp 파일 보기

@@ -649,7 +649,7 @@ void GcodeSuite::G33() {
649 649
           }
650 650
         SERIAL_EOL();
651 651
         char mess[21];
652
-        sprintf_P(mess, PSTR("Calibration sd:"));
652
+        strcpy_P(mess, PSTR("Calibration sd:"));
653 653
         if (zero_std_dev_min < 1)
654 654
           sprintf_P(&mess[15], PSTR("0.%03i"), (int)round(zero_std_dev_min * 1000.0));
655 655
         else
@@ -664,7 +664,7 @@ void GcodeSuite::G33() {
664 664
         if (iterations < 31)
665 665
           sprintf_P(mess, PSTR("Iteration : %02i"), (int)iterations);
666 666
         else
667
-          sprintf_P(mess, PSTR("No convergence"));
667
+          strcpy_P(mess, PSTR("No convergence"));
668 668
         SERIAL_PROTOCOL(mess);
669 669
         SERIAL_PROTOCOL_SP(32);
670 670
         SERIAL_PROTOCOLPGM("std dev:");
@@ -683,8 +683,8 @@ void GcodeSuite::G33() {
683 683
       SERIAL_EOL();
684 684
 
685 685
       char mess[21];
686
-      sprintf_P(mess, enddryrun);
687
-      sprintf_P(&mess[11], PSTR(" sd:"));
686
+      strcpy_P(mess, enddryrun);
687
+      strcpy_P(&mess[11], PSTR(" sd:"));
688 688
       if (zero_std_dev < 1)
689 689
         sprintf_P(&mess[15], PSTR("0.%03i"), (int)round(zero_std_dev * 1000.0));
690 690
       else

Loading…
취소
저장