From: tedu Date: Mon, 5 Jan 2015 13:52:47 +0000 (+0000) Subject: use the correct read count when determining how swabbing is necessary. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b39ae59af641fd914c1af47da849434a54bbc1b4;p=openbsd use the correct read count when determining how swabbing is necessary. bug report from Martin Wolters --- diff --git a/bin/dd/dd.c b/bin/dd/dd.c index 6be77e185d9..23f9608aec1 100644 --- a/bin/dd/dd.c +++ b/bin/dd/dd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dd.c,v 1.19 2014/12/11 20:39:06 tedu Exp $ */ +/* $OpenBSD: dd.c,v 1.20 2015/01/05 13:52:47 tedu Exp $ */ /* $NetBSD: dd.c,v 1.6 1996/02/20 19:29:06 jtc Exp $ */ /*- @@ -304,7 +304,7 @@ dd_in(void) } if (ddflags & C_SWAB) { - if ((n = in.dbcnt) & 1) { + if ((n = in.dbrcnt) & 1) { ++st.swab; --n; }