Skip to content
Snippets Groups Projects
Commit b4e18168 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

64-bit free disk space fix

parent 69ad765e
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -1227,6 +1227,7 @@ int zmodem_recv_header_raw(zmodem_t* zm) ...@@ -1227,6 +1227,7 @@ int zmodem_recv_header_raw(zmodem_t* zm)
int c; int c;
int type = INVALIDSUBPKT; int type = INVALIDSUBPKT;
int frame_type; int frame_type;
uint64_t freespace;
// lprintf(zm,LOG_DEBUG, __FUNCTION__); // lprintf(zm,LOG_DEBUG, __FUNCTION__);
...@@ -1330,7 +1331,8 @@ int zmodem_recv_header_raw(zmodem_t* zm) ...@@ -1330,7 +1331,8 @@ int zmodem_recv_header_raw(zmodem_t* zm)
} }
break; break;
case ZFREECNT: case ZFREECNT:
zmodem_send_pos_header(zm, ZACK, getfreediskspace(".",1), /* Hex? */ TRUE); freespace = getfreediskspace(".",1);
zmodem_send_pos_header(zm, ZACK, (uint32_t)(freespace > UINT32_MAX ? UINT32_MAX : freespace), /* Hex? */ TRUE);
break; break;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment