Browse Source

Fix out_of_range_error()

For sprintf_P() the first parameter has to be a `char*` not `const char*`.
AnHardt 9 years ago
parent
commit
17b0ec84ed
1 changed files with 6 additions and 4 deletions
  1. 6
    4
      Marlin/Marlin_main.cpp

+ 6
- 4
Marlin/Marlin_main.cpp View File

2437
 
2437
 
2438
 #elif defined(ENABLE_AUTO_BED_LEVELING)
2438
 #elif defined(ENABLE_AUTO_BED_LEVELING)
2439
 
2439
 
2440
-  void out_of_range_error(const char *edge) {
2441
-    char msg[40];
2442
-    sprintf_P(msg, PSTR("?Probe %s position out of range.\n"), edge);
2443
-    SERIAL_PROTOCOL(msg);
2440
+  void out_of_range_error(const char *p_edge) {
2441
+    char edge[10];
2442
+    strncpy_P(edge, p_edge, 10);
2443
+    SERIAL_PROTOCOLPGM("?Probe ");
2444
+    SERIAL_PROTOCOL(edge);
2445
+    SERIAL_PROTOCOLLNPGM(" position out of range.");
2444
   }
2446
   }
2445
 
2447
 
2446
   /**
2448
   /**

Loading…
Cancel
Save