Update maxchunk calculation to use g_conn structure
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
This commit is contained in:
1 parent
bb42ca8ca7
commit
efed954b25
1 file changed
+1
-1
+1
-1
@@ -2340,7 +2340,7 @@ static int CmdBWMUpgrade(const char *Cmd) {
|
||||
PrintAndLogEx(INFO, "Uploading " _YELLOW_("%zu") " bytes of ESP firmware over the BWM link...", fwlen);
|
||||
|
||||
// WRITE chunks (one action byte + as much firmware as fits the negotiated frame)
|
||||
size_t maxchunk = (size_t)pm3_max_cmd_data_size() - 1;
|
||||
size_t maxchunk = (size_t)g_conn.max_cmd_data_size - 1;
|
||||
uint8_t *buf = calloc(1, maxchunk + 1);
|
||||
if (buf == NULL) {
|
||||
free(fw);
|
||||
|
||||
Reference in new issue
Block a user