Skip to content

Commit 1f00aeb

Browse files
authored
Improve the _IRREMOTEESP8266_VERSION_VAL macro (#1875)
Make the parameter expansion safer. For #1870
1 parent 61c19e2 commit 1f00aeb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/IRremoteESP8266.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
#define _IRREMOTEESP8266_VERSION_PATCH 2
6262
// Macro to convert version info into an integer
6363
#define _IRREMOTEESP8266_VERSION_VAL(major, minor, patch) \
64-
((major << 16) | (minor << 8) | (patch))
64+
(((major) << 16) | ((minor) << 8) | (patch))
6565
// Macro to convert literal into a string
6666
#define MKSTR_HELPER(x) #x
6767
#define MKSTR(x) MKSTR_HELPER(x)

0 commit comments

Comments
 (0)