From 5ad7d263e9cace652f5fc4a7c3cc67685a322978 Mon Sep 17 00:00:00 2001
From: Blue-Marlin <Makaira@Marlin-Firmware.org>
Date: Mon, 2 May 2016 15:58:04 +0200
Subject: [PATCH] 8.3-filenames second try

Fix for #6 3593, #3648
this time excludung 'DEL' instead of accidently '~'.
---
 Marlin/SdBaseFile.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Marlin/SdBaseFile.cpp b/Marlin/SdBaseFile.cpp
index 42403ec578..95765f9c18 100644
--- a/Marlin/SdBaseFile.cpp
+++ b/Marlin/SdBaseFile.cpp
@@ -405,7 +405,7 @@ bool SdBaseFile::make83Name(const char* str, uint8_t* name, const char** ptr) {
       uint8_t b;
       while ((b = pgm_read_byte(p++))) if (b == c) goto fail;
       // check size and only allow ASCII printable characters
-      if (i > n || c < 0x21 || c > 0x7E) goto fail;
+      if (i > n || c < 0x21 || c == 0x7F) goto fail;
       // only upper case allowed in 8.3 names - convert lower to upper
       name[i++] = (c < 'a' || c > 'z') ? (c) : (c + ('A' - 'a'));
     }
-- 
GitLab