Skip to content

Commit

Permalink
Merge pull request #3648 from Blue-Marlin/83filenames
Browse files Browse the repository at this point in the history
Don't reject 8.3-filenames with chars > 0x7f
  • Loading branch information
thinkyhead committed May 1, 2016
2 parents 98f3028 + ac4caab commit 77d6e52
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 == 0X7E)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 77d6e52

Please sign in to comment.