Skip to content

Commit

Permalink
Oops, message sending SNAFU in last two commits
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Sep 23, 2024
1 parent 10a0d00 commit d59bc42
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/smax-messages.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ static int SendMessage(const char *type, const char *text, va_list varg) {
if(!type) return x_error(X_NULL, EINVAL, fn, "type parameter is NULL");
if(!text) return x_error(X_NULL, EINVAL, fn, "text parameter is NULL");

if(strlen(text) > sizeof(msg) - X_TIMESTAMP_LENGTH - 1) x_error(X_NULL, EINVAL, fn, "text message is too long: >= %ld bytes", (long) strlen(text));

n = sizeof(MESSAGES_PREFIX) + strlen(id) + X_SEP_LENGTH + strlen(type);
channel = malloc(n);
if(!channel) return x_error(X_NULL, errno, fn, "malloc() error (channel: %d bytes)", n);
Expand Down

0 comments on commit d59bc42

Please sign in to comment.