From: Joseph C. Lehner Date: Sun, 7 Feb 2016 21:14:04 +0000 (+0100) Subject: Correctly transmit empty file X-Git-Tag: v0.9~26 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d210bbebf5c5e6ad798d061370790449a31ce3d7;p=oweals%2Fnmrpflash.git Correctly transmit empty file --- diff --git a/tftp.c b/tftp.c index 89d98c0..f0f0457 100644 --- a/tftp.c +++ b/tftp.c @@ -272,7 +272,7 @@ int tftp_put(struct nmrpd_args *args) ret = len; goto cleanup; } else if (!len) { - if (last_len != 512) { + if (last_len != 512 && last_len != -1) { break; } }