From 55b23c896a67a8a096b3c7ae694558bbf15a2351 Mon Sep 17 00:00:00 2001 From: AnHardt Date: Tue, 9 Jun 2015 12:21:47 +0200 Subject: [PATCH] Optimise out_of_range_error() (PR#2265) by avoiding the strncopy() --- Marlin/Marlin_main.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index ff34a0aca..e10d778d5 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2495,10 +2495,8 @@ inline void gcode_G28() { #elif defined(ENABLE_AUTO_BED_LEVELING) void out_of_range_error(const char *p_edge) { - char edge[10]; - strncpy_P(edge, p_edge, 10); SERIAL_PROTOCOLPGM("?Probe "); - SERIAL_PROTOCOL(edge); + serialprintPGM(p_edge); SERIAL_PROTOCOLLNPGM(" position out of range."); }