From 1e97e51d2aae886fb4c139c6505a8854a72451e1 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Sat, 30 Aug 2014 14:12:12 +0200 Subject: [PATCH] Canned G-code: fix reading flash memory. --- mendel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mendel.c b/mendel.c index a78abfb..c18636c 100644 --- a/mendel.c +++ b/mendel.c @@ -287,10 +287,10 @@ int main (void) If ever print-from-SD card is implemented, these changes may become necessary. */ - if (pgm_read_byte(canned_gcode_P[++canned_gcode_pos]) == 0) + if (pgm_read_byte(&(canned_gcode_P[++canned_gcode_pos])) == 0) canned_gcode_pos = 0; else - gcode_parse_char(pgm_read_byte(canned_gcode_P[canned_gcode_pos])); + gcode_parse_char(pgm_read_byte(&(canned_gcode_P[canned_gcode_pos]))); #endif /* CANNED_CYCLE */ }