]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
minor adjustment to patch for #914
authorAlexander Zangerl <alexz@opmantek.com>
Wed, 31 Oct 2018 23:40:03 +0000 (09:40 +1000)
committerTobias Oetiker <tobi@oetiker.ch>
Thu, 1 Nov 2018 10:41:22 +0000 (11:41 +0100)
src/rrd_graph.c

index 108891fc97a35827995d3aba08873705b3c81389..06731defe7f0cb98de811f782c60159e277b7bda 100644 (file)
@@ -6183,7 +6183,7 @@ image_title_t graph_title_split(
 
     retval.lines = malloc((MAX_IMAGE_TITLE_LINES + 1 ) * sizeof(char *));
 
-    char *delims[4] = { "\n", "\\n", "<br>", "<br/>" };
+    char *delims[] = { "\n", "\\n", "<br>", "<br/>" };
     // printf("unsplit title: %s\n", title);
 
     char *consumed = strdup(title); /* allocates copy */
@@ -6197,7 +6197,7 @@ image_title_t graph_title_split(
          as there's no guarantee that we'll find the earliest delimiter first!
        */
        found_delim = 0;
-       for(unsigned int i=0; i < 4; i++)
+       for(unsigned int i=0; i < sizeof(delims); i++)
        {
           // printf("looking for delim '%s', in '%s'\n", delims[i], consumed);
           int delim_size = strlen(delims[i]);