From eee04e2563ef6003db525c3c19c39dc7b332f8a7 Mon Sep 17 00:00:00 2001 From: Sergey Popov Date: Sat, 31 Dec 2011 11:48:35 +0400 Subject: [PATCH] fix LPT pin numeration --- yasnd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yasnd.c b/yasnd.c index 2a0261d..2702fe5 100644 --- a/yasnd.c +++ b/yasnd.c @@ -207,12 +207,12 @@ void reset_pin(int pin_num) { if (pin_num==0) return; // there is no LPT control for target host - if (pin_num<0 || pin_num>8) + if (pin_num<2 || pin_num>8) { log_event("Error: incorrent LPT pin number"); return; } - int pins = 1<<(pin_num); + int pins = 1<<(pin_num-1); if (ioperm (lpt_port, 3, 1)) { log_event("Error: LPT port access error");