mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-07-03 12:20:55 +00:00
Few simple fixes that save RAM, as static strings are stored in RAM by default.
This commit is contained in:
parent
c94ca24adc
commit
97fa2a9c30
6 changed files with 36 additions and 25 deletions
Marlin
|
@ -400,7 +400,7 @@ bool SdBaseFile::make83Name(const char* str, uint8_t* name, const char** ptr) {
|
|||
// check size and only allow ASCII printable characters
|
||||
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');
|
||||
name[i++] = (c < 'a' || c > 'z') ? (c) : (c + ('A' - 'a'));
|
||||
}
|
||||
}
|
||||
*ptr = str;
|
||||
|
@ -1822,4 +1822,4 @@ void (*SdBaseFile::oldDateTime_)(uint16_t& date, uint16_t& time) = 0; // NOLINT
|
|||
#endif // ALLOW_DEPRECATED_FUNCTIONS
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue