Browse Source

notifications: Fix iteration over notification topics

Turns out that checking boundaries is important...

Signed-off-by: Christian Decker <decker.christian@gmail.com>
plugin-timeout-inc
Christian Decker 6 years ago
committed by Rusty Russell
parent
commit
71934f983a
  1. 2
      lightningd/notification.c

2
lightningd/notification.c

@ -8,7 +8,7 @@ const char *notification_topics[] = {
bool notifications_have_topic(const char *topic)
{
for (size_t i=0; ARRAY_SIZE(notification_topics); i++)
for (size_t i=0; i<ARRAY_SIZE(notification_topics); i++)
if (streq(topic, notification_topics[i]))
return true;
return false;

Loading…
Cancel
Save