Skip to content

Commit

Permalink
Update common.h
Browse files Browse the repository at this point in the history
  • Loading branch information
Memorix101 committed Jan 8, 2025
1 parent c9d77e7 commit 26fb1b2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ extern "C" {
#define ABS(x) ((x)<0?-(x):(x))
#endif

#ifdef DISABLE_SNPRINTF_CHECKS
#define snprintf_check(dst, size, ...) snprintf(dst, size, __VA_ARGS__)
#else
#define snprintf_check(dst, size, ...) do { \
int __len; \
__len = snprintf(dst, size, __VA_ARGS__); \
Expand All @@ -101,6 +104,8 @@ extern "C" {
quit(2); \
} \
} while (0)
#endif


#ifdef __cplusplus
}
Expand Down

0 comments on commit 26fb1b2

Please sign in to comment.