Use strcmp() instead of strncmp()
strncmp() isn't intended to be a secure strcmp() replacement, it is designed to be used if you want to compare the first n characters of two strings. Since we always compare character pointers with string literals, switch to using strcmp() everywhere. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
@@ -418,7 +418,7 @@ item_in_popup (char *saved_a_start, char *saved_a_end, char *msg,
|
||||
|
||||
pad = newpad (padl, padw);
|
||||
popup_win = popup (winl, winw, 1, 2, pop_title, NULL, 1);
|
||||
if (strncmp (pop_title, _("Appointment"), 11) == 0)
|
||||
if (strcmp (pop_title, _("Appointment")) == 0)
|
||||
{
|
||||
mvwprintw (popup_win, margin_top, margin_left, "- %s -> %s",
|
||||
saved_a_start, saved_a_end);
|
||||
|
||||
Reference in New Issue
Block a user