Skip to content

Commit

Permalink
Constant in upcase
Browse files Browse the repository at this point in the history
  • Loading branch information
uhlin committed Feb 2, 2025
1 parent 37f7501 commit 1496453
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/events/privmsg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
/*
* Notification message max length
*/
static const size_t nmsg_maxlen = 150;
static const size_t NMSG_MAXLEN = 150;

static bool shouldHighlightMessage_case1(CSTRING) NONNULL;
static bool shouldHighlightMessage_case2(CSTRING) NONNULL;
Expand Down Expand Up @@ -292,8 +292,8 @@ handle_private_msgs(PPRINTTEXT_CONTEXT ctx, CSTRING nick, CSTRING msg)
printtext(ctx, "%s%s%s%c%s %s", NICK_S1, COLOR2, nick, NORMAL, NICK_S2,
msg);
msg_copy = sw_strdup(msg);
if (strlen(msg_copy) > nmsg_maxlen)
msg_copy[nmsg_maxlen] = '\0';
if (strlen(msg_copy) > NMSG_MAXLEN)
msg_copy[NMSG_MAXLEN] = '\0';

#if defined(WIN32) && defined(TOAST_NOTIFICATIONS)
wchar_t *wNick = get_converted_wcs(nick);
Expand Down Expand Up @@ -351,8 +351,8 @@ handle_chan_msgs(PPRINTTEXT_CONTEXT ctx, CSTRING nick, CSTRING dest,
NICK_S1, c, COLOR4, nick, NORMAL, NICK_S2,
msg);
msg_copy = sw_strdup(msg);
if (strlen(msg_copy) > nmsg_maxlen)
msg_copy[nmsg_maxlen] = '\0';
if (strlen(msg_copy) > NMSG_MAXLEN)
msg_copy[NMSG_MAXLEN] = '\0';

if (ctx->window != g_active_window)
broadcast_window_activity(ctx->window);
Expand Down

0 comments on commit 1496453

Please sign in to comment.