Skip to content

Commit 82553a7

Browse files
berndpetrovitschBernd Petrovitsch
andauthored
wrap macro arguments in parentheses for robustness (#4681)
Co-authored-by: Bernd Petrovitsch <bernd@sysprog.at>
1 parent 8d3f731 commit 82553a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/fmt/fmt-c.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ typedef enum {} fmt_signed_char;
170170

171171
# define fmt_format(buffer, size, fmt, ...) \
172172
fmt_vformat( \
173-
buffer, size, fmt, \
173+
(buffer), (size), (fmt), \
174174
(fmt_arg[]){{fmt_int}, FMT_MAP(FMT_MAKE_ARG, ##__VA_ARGS__)} + 1, \
175175
FMT_NARG(__VA_ARGS__))
176176

0 commit comments

Comments
 (0)