Procházet zdrojové kódy

Revert PR 3648 to fix SD printing

The character 0x7E is common in 8.3 filenames. Maybe the last condition
should be removed completely instead.
Scott Lahteine před 9 roky
rodič
revize
da47b83b3d
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1
    1
      Marlin/SdBaseFile.cpp

+ 1
- 1
Marlin/SdBaseFile.cpp Zobrazit soubor

405
       uint8_t b;
405
       uint8_t b;
406
       while ((b = pgm_read_byte(p++))) if (b == c) goto fail;
406
       while ((b = pgm_read_byte(p++))) if (b == c) goto fail;
407
       // check size and only allow ASCII printable characters
407
       // check size and only allow ASCII printable characters
408
-      if (i > n || c < 0X21 || c == 0X7E)goto fail;
408
+      if (i > n || c < 0x21 || c > 0x7E) goto fail;
409
       // only upper case allowed in 8.3 names - convert lower to upper
409
       // only upper case allowed in 8.3 names - convert lower to upper
410
       name[i++] = (c < 'a' || c > 'z') ? (c) : (c + ('A' - 'a'));
410
       name[i++] = (c < 'a' || c > 'z') ? (c) : (c + ('A' - 'a'));
411
     }
411
     }

Loading…
Zrušit
Uložit