From 888d88ef6e1806d500ab1293d88f31276638f21a Mon Sep 17 00:00:00 2001 From: mstroh76 Date: Sat, 27 Jan 2024 19:24:43 +0100 Subject: [PATCH] #16 --- wiringPi/wiringPi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiringPi/wiringPi.c b/wiringPi/wiringPi.c index 25c957c..5fec7c2 100644 --- a/wiringPi/wiringPi.c +++ b/wiringPi/wiringPi.c @@ -502,7 +502,7 @@ int GPIOToSysFS(const int pin) { } if (PI_MODEL_5 == RaspberryPiModel) { sysfspin = pin + 399; - if (pin>426) { // only 399-426 supported + if (sysfspin<399 || sysfspin>426) { // only 399-426 supported, 40-pin GPIO header sysfspin = -1; } }