Pārlūkot izejas kodu

Fix problem described in issue # 6175

As it turns out...   an unsigned int can not go to less than 0,  so the
loop never terminates.
Roxy-3D 8 gadus atpakaļ
vecāks
revīzija
3e9e94801f
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1
    1
      Marlin/UBL_Bed_Leveling.cpp

+ 1
- 1
Marlin/UBL_Bed_Leveling.cpp Parādīt failu

@@ -193,7 +193,7 @@
193 193
     const float current_xi = ubl.get_cell_index_x(current_position[X_AXIS] + (MESH_X_DIST) / 2.0),
194 194
                 current_yi = ubl.get_cell_index_y(current_position[Y_AXIS] + (MESH_Y_DIST) / 2.0);
195 195
 
196
-    for (uint8_t j = UBL_MESH_NUM_Y_POINTS - 1; j >= 0; j--) {
196
+    for (int8_t j = UBL_MESH_NUM_Y_POINTS - 1; j >= 0; j--) {
197 197
       for (uint8_t i = 0; i < UBL_MESH_NUM_X_POINTS; i++) {
198 198
         const bool is_current = i == current_xi && j == current_yi;
199 199
 

Notiek ielāde…
Atcelt
Saglabāt