Skip to content

Commit

Permalink
Merge pull request #3661 from Blue-Marlin/83filen2
Browse files Browse the repository at this point in the history
8.3-filenames second try
  • Loading branch information
thinkyhead committed May 2, 2016
2 parents 0bae00c + 5ad7d26 commit f1c1a8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Marlin/SdBaseFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}
Expand Down

0 comments on commit f1c1a8d

Please sign in to comment.