diff options
| author | Rangi <remy.oukaour+rangi42@gmail.com> | 2022-10-14 16:21:42 -0400 |
|---|---|---|
| committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2022-10-14 16:21:42 -0400 |
| commit | 9d7b581310eb500910a4cf89e9f2a317eee40ec8 (patch) | |
| tree | 59967fce040a26f1d1c9be664b6fd58788a7ed0a /tools/make_patch.c | |
| parent | Update tools/unnamed.py for rgbds 0.6.0 object files (diff) | |
| download | pokeyellow-9d7b581310eb500910a4cf89e9f2a317eee40ec8.tar.gz pokeyellow-9d7b581310eb500910a4cf89e9f2a317eee40ec8.tar.xz pokeyellow-9d7b581310eb500910a4cf89e9f2a317eee40ec8.zip | |
Add `COUNTOF` macro to tools/common.h
Diffstat (limited to 'tools/make_patch.c')
| -rw-r--r-- | tools/make_patch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/make_patch.c b/tools/make_patch.c index 71c6b455..ecfd67b2 100644 --- a/tools/make_patch.c +++ b/tools/make_patch.c @@ -165,7 +165,7 @@ int strfind(const char *s, const char *list[], int count) { return -1; } -#define vstrfind(s, ...) strfind(s, (const char *[]){__VA_ARGS__}, sizeof (const char *[]){__VA_ARGS__} / sizeof(const char *)) +#define vstrfind(s, ...) strfind(s, (const char *[]){__VA_ARGS__}, COUNTOF((const char *[]){__VA_ARGS__})) int parse_arg_value(const char *arg, bool absolute, const struct Symbol *symbols, const char *patch_name) { // Comparison operators for "ConditionValueB" evaluate to their particular values |
