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");