commit 5962df9a75514a370e16e12d9311a3d2ff3c2037 parent ad8658ee5a1d071766a41db76e86ea0daf384084 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Fri, 18 Dec 2015 17:17:25 +0100 check piecelen <= 0 Diffstat:
M | torrent.c | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/torrent.c b/torrent.c @@ -106,8 +106,8 @@ loadtorrent(char *f) goto err2; } t->piecelen = dlookstr(t->info, "piece length")->i; - if (!t->piecelen) { - warnx("piecelen is 0 in %s", f); + if (t->piecelen <= 0) { + warnx("piecelen is <= 0 in %s", f); goto err2; }