|
@@ -84,7 +84,7 @@ void mc_err_block_save(void) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
int mc_crit_err_get(s16 offset, u8 *buff, int len) {
|
|
int mc_crit_err_get(s16 offset, u8 *buff, int len) {
|
|
|
- int count = len / sizeof(err_node_t);
|
|
|
|
|
|
|
+ int count = (len - 1) / sizeof(err_node_t);
|
|
|
int index = offset;
|
|
int index = offset;
|
|
|
u8 *p_remain = buff++;
|
|
u8 *p_remain = buff++;
|
|
|
if (_e_nv->count == ERR_MAX_SIZE) {
|
|
if (_e_nv->count == ERR_MAX_SIZE) {
|
|
@@ -109,7 +109,7 @@ int mc_crit_err_get(s16 offset, u8 *buff, int len) {
|
|
|
|
|
|
|
|
|
|
|
|
|
int mc_err_runtime_get(s16 offset, u8 *buff, int len) {
|
|
int mc_err_runtime_get(s16 offset, u8 *buff, int len) {
|
|
|
- int count = len / sizeof(runtime_node_t);
|
|
|
|
|
|
|
+ int count = (len - 1) / sizeof(runtime_node_t);
|
|
|
int index = offset;
|
|
int index = offset;
|
|
|
u8 *p_remain = buff++;
|
|
u8 *p_remain = buff++;
|
|
|
if (_r_nv->count == RUNTIME_MAX_SIZE) {
|
|
if (_r_nv->count == RUNTIME_MAX_SIZE) {
|