Browse Source

Merge pull request #1640 from AnHardt/warning6

codepos not used in gcode_M28()
Scott Lahteine 10 years ago
parent
commit
2424713a8f
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      Marlin/Marlin_main.cpp

+ 2
- 2
Marlin/Marlin_main.cpp View File

2562
    */
2562
    */
2563
   inline void gcode_M28() {
2563
   inline void gcode_M28() {
2564
     char* codepos = strchr_pointer + 4;
2564
     char* codepos = strchr_pointer + 4;
2565
-    char* starpos = strchr(strchr_pointer + 4, '*');
2565
+    char* starpos = strchr(codepos, '*');
2566
     if (starpos) {
2566
     if (starpos) {
2567
       char* npos = strchr(cmdbuffer[bufindr], 'N');
2567
       char* npos = strchr(cmdbuffer[bufindr], 'N');
2568
       strchr_pointer = strchr(npos, ' ') + 1;
2568
       strchr_pointer = strchr(npos, ' ') + 1;
2569
       *(starpos) = '\0';
2569
       *(starpos) = '\0';
2570
     }
2570
     }
2571
-    card.openFile(strchr_pointer + 4, false);
2571
+    card.openFile(codepos, false);
2572
   }
2572
   }
2573
 
2573
 
2574
   /**
2574
   /**

Loading…
Cancel
Save