Ver código fonte

Merge pull request #8315 from thinkyhead/bf1_sprintf_p_fix

[1.1] Patch abuse of sprintf_P in G33
Scott Lahteine 7 anos atrás
pai
commit
2fb35f7991
Nenhuma conta vinculada ao e-mail do autor do commit
1 arquivos alterados com 4 adições e 4 exclusões
  1. 4
    4
      Marlin/Marlin_main.cpp

+ 4
- 4
Marlin/Marlin_main.cpp Ver arquivo

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

Carregando…
Cancelar
Salvar