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

64-bit free disk space fix

parent 8a1dfef6
No related branches found
No related tags found
No related merge requests found
......@@ -1227,6 +1227,7 @@ int zmodem_recv_header_raw(zmodem_t* zm)
int c;
int type = INVALIDSUBPKT;
int frame_type;
uint64_t freespace;
// lprintf(zm,LOG_DEBUG, __FUNCTION__);
......@@ -1330,7 +1331,8 @@ int zmodem_recv_header_raw(zmodem_t* zm)
}
break;
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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment