1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-23 20:18:52 +00:00
Fix size for writeData and readData.
For bilinear grid 11 x 11 for example, size is 4 (float) x 11 x 11 = 484. uint8_t max is 255.
This commit is contained in:
MagoKimbra 2016-12-16 14:49:33 +01:00 committed by GitHub
parent 2e904cb4f9
commit 86ba7e4542

View File

@ -183,7 +183,7 @@ void Config_Postprocess() {
bool eeprom_write_error;
void _EEPROM_writeData(int &pos, uint8_t* value, uint8_t size) {
void _EEPROM_writeData(int &pos, uint8_t* value, uint16_t size) {
if (eeprom_write_error) return;
while (size--) {
uint8_t * const p = (uint8_t * const)pos;
@ -205,7 +205,7 @@ void Config_Postprocess() {
};
}
bool eeprom_read_error;
void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) {
void _EEPROM_readData(int &pos, uint8_t* value, uint16_t size) {
do {
uint8_t c = eeprom_read_byte((unsigned char*)pos);
if (!eeprom_read_error) *value = c;