Skip to content

Commit

Permalink
Improve the _IRREMOTEESP8266_VERSION_VAL macro (#1875)
Browse files Browse the repository at this point in the history
Make the parameter expansion safer.
For #1870
  • Loading branch information
crankyoldgit authored Sep 10, 2022
1 parent 61c19e2 commit 1f00aeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/IRremoteESP8266.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
#define _IRREMOTEESP8266_VERSION_PATCH 2
// Macro to convert version info into an integer
#define _IRREMOTEESP8266_VERSION_VAL(major, minor, patch) \
((major << 16) | (minor << 8) | (patch))
(((major) << 16) | ((minor) << 8) | (patch))
// Macro to convert literal into a string
#define MKSTR_HELPER(x) #x
#define MKSTR(x) MKSTR_HELPER(x)
Expand Down

0 comments on commit 1f00aeb

Please sign in to comment.