From 1f03d1272ac352dd78f21fe08e5c5934c57c7622 Mon Sep 17 00:00:00 2001 From: MCUdude Date: Mon, 1 Mar 2021 22:21:32 +0100 Subject: [PATCH] Squashed 'avr/cores/MCUdude_corefiles/' changes from a367b8b9a..172d7e3bd 172d7e3bd Fix typo in abs() macro git-subtree-dir: avr/cores/MCUdude_corefiles git-subtree-split: 172d7e3bd43db57ffbe02f815384ad6cdf992f8f --- Arduino.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arduino.h b/Arduino.h index fe006267..d903d171 100755 --- a/Arduino.h +++ b/Arduino.h @@ -121,7 +121,7 @@ void yield(void); #undef abs #endif -#define abs(x) ({ typeof (x) _x = (x); _x > 0 ? _x : -x; }) +#define abs(x) ({ typeof (x) _x = (x); _x > 0 ? _x : -_x; }) #define sq(x) ({ typeof (x) _x = (x); _x * _x; }) #define min(a,b) ({ typeof (a) _a = (a); typeof (b) _b = (b); _a < _b ? _a : _b; }) #define max(a,b) ({ typeof (a) _a = (a); typeof (b) _b = (b); _a > _b ? _a : _b; })