Browse Source

Make use of codepos.

Saves one addition.
Needs one pointer on the stack.

Don't know if this is a go trade.
pull/1/head
AnHardt 10 years ago
parent
commit
ae01a6b5f2
  1. 6
      Marlin/Marlin_main.cpp

6
Marlin/Marlin_main.cpp

@ -2564,14 +2564,14 @@ inline void gcode_M17() {
* M28: Start SD Write * M28: Start SD Write
*/ */
inline void gcode_M28() { inline void gcode_M28() {
// char* codepos = strchr_pointer + 4; // ??? not used ??? char* codepos = strchr_pointer + 4;
char* starpos = strchr(strchr_pointer + 4, '*'); char* starpos = strchr(codepos, '*');
if (starpos) { if (starpos) {
char* npos = strchr(cmdbuffer[bufindr], 'N'); char* npos = strchr(cmdbuffer[bufindr], 'N');
strchr_pointer = strchr(npos, ' ') + 1; strchr_pointer = strchr(npos, ' ') + 1;
*(starpos) = '\0'; *(starpos) = '\0';
} }
card.openFile(strchr_pointer + 4, false); card.openFile(codepos, false);
} }
/** /**

Loading…
Cancel
Save