Skip to content

Commit

Permalink
Merge pull request #736 from sjinks/issue-735
Browse files Browse the repository at this point in the history
Add missing arguments to snprintf()
  • Loading branch information
Phalcon committed Jun 28, 2013
2 parents 4e3a7be + 8761a0a commit 6e4698d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ext/annotations/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ static void jj_syntax_error(
snprintf(status->syntax_error, status->syntax_error_len, "Syntax error, unexpected token %s, at the end of docblock in %s on line %d", token_name, Z_STRVAL_P(status->scanner_state->active_file), status->scanner_state->active_line);
}
} else {
snprintf(status->syntax_error, status->syntax_error_len, "Syntax error, unexpected EOF, at the end of docblock in %s on line %d");
snprintf(status->syntax_error, status->syntax_error_len, "Syntax error, unexpected EOF, at the end of docblock in %s on line %d", Z_STRVAL_P(status->scanner_state->active_file), status->scanner_state->active_line);
}
status->syntax_error[status->syntax_error_len-1] = '\0';
}
Expand Down Expand Up @@ -1622,4 +1622,4 @@ int phannot_internal_parse_annotations(zval **result, zval *comment, zval *file_
efree(state);

return status;
}
}
2 changes: 1 addition & 1 deletion ext/annotations/parser.lemon
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ static zval *phannot_ret_annotation(phannot_parser_token *name, zval *arguments,
snprintf(status->syntax_error, status->syntax_error_len, "Syntax error, unexpected token %s, at the end of docblock in %s on line %d", token_name, Z_STRVAL_P(status->scanner_state->active_file), status->scanner_state->active_line);
}
} else {
snprintf(status->syntax_error, status->syntax_error_len, "Syntax error, unexpected EOF, at the end of docblock in %s on line %d");
snprintf(status->syntax_error, status->syntax_error_len, "Syntax error, unexpected EOF, at the end of docblock in %s on line %d", Z_STRVAL_P(status->scanner_state->active_file), status->scanner_state->active_line);
}
status->syntax_error[status->syntax_error_len-1] = '\0';
}
Expand Down

0 comments on commit 6e4698d

Please sign in to comment.