From b39ae59af641fd914c1af47da849434a54bbc1b4 Mon Sep 17 00:00:00 2001 From: tedu Date: Mon, 5 Jan 2015 13:52:47 +0000 Subject: [PATCH] use the correct read count when determining how swabbing is necessary. bug report from Martin Wolters --- bin/dd/dd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.20.1