~sircmpwn/annotatec

abbd755a2950632bc756a330ed2be0dc65caef6d — Drew DeVault 7 months ago 337387b
Fix snprintf check
1 files changed, 1 insertions(+), 1 deletions(-)

M main.c
M main.c => main.c +1 -1
@@ 6,7 6,7 @@

static FILE *invoke_cpp(const char *cppcmd, const char *input) {
	char cmd[4096];
	if (snprintf(cmd, sizeof(cmd), "%s %s", cppcmd, input) == -1) {
	if (snprintf(cmd, sizeof(cmd), "%s %s", cppcmd, input) == sizeof(cmd)) {
		fprintf(stderr, "cpp command larger than internal buffer\n");
		exit(1);
	}