Browse Source

Fixed invalid addressing (overflow) of position_shift / software endstops

Signed-off-by: Jeff K
Jeff K 9 years ago
parent
commit
90c49f5a14
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      Marlin/Marlin_main.cpp

+ 5
- 4
Marlin/Marlin_main.cpp View File

@@ -3598,13 +3598,14 @@ inline void gcode_G92() {
3598 3598
 
3599 3599
       current_position[i] = v;
3600 3600
 
3601
-      position_shift[i] += v - p; // Offset the coordinate space
3602
-      update_software_endstops((AxisEnum)i);
3603
-
3604 3601
       if (i == E_AXIS)
3605 3602
         plan_set_e_position(v);
3606
-      else
3603
+      else {
3604
+        position_shift[i] += v - p; // Offset the coordinate space
3605
+        update_software_endstops((AxisEnum)i);
3606
+		  
3607 3607
         didXYZ = true;
3608
+	  }
3608 3609
     }
3609 3610
   }
3610 3611
   if (didXYZ) {

Loading…
Cancel
Save