removed end marker of artwork config token list (not really needed)
authorHolger Schemel <holger.schemel@virtion.de>
Mon, 9 Sep 2024 22:29:08 +0000 (00:29 +0200)
committerHolger Schemel <holger.schemel@virtion.de>
Mon, 9 Sep 2024 22:29:10 +0000 (00:29 +0200)
src/libgame/setup.c

index 0905a06e705878a7fd673196f7a1fbfa3587ac67..23170fa630da05b4eb9234266716ce7319982392 100644 (file)
@@ -2900,8 +2900,6 @@ static struct TokenInfo artworkinfo_tokens[] =
   { TYPE_STRING,       &ldi.fullpath,                  "fullpath"                      },
   { TYPE_BOOLEAN,      &ldi.in_user_dir,               "in_user_dir"                   },
   { TYPE_STRING,       &ldi.class_desc,                "class_desc"                    },
-
-  { -1,                        NULL,                           NULL                            },
 };
 
 static char *optional_tokens[] =
@@ -3503,7 +3501,7 @@ static TreeInfo *getArtworkInfoCacheEntry(LevelDirTree *level_node, int type)
 
     // set all structure fields according to the token/value pairs
     ldi = *artwork_info;
-    for (i = 0; artworkinfo_tokens[i].type != -1; i++)
+    for (i = 0; i < ARRAY_SIZE(artworkinfo_tokens); i++)
     {
       char *token_suffix = artworkinfo_tokens[i].text;
       char *token = getCacheToken(token_prefix, token_suffix);
@@ -3594,7 +3592,7 @@ static void setArtworkInfoCacheEntry(TreeInfo *artwork_info,
   }
 
   ldi = *artwork_info;
-  for (i = 0; artworkinfo_tokens[i].type != -1; i++)
+  for (i = 0; i < ARRAY_SIZE(artworkinfo_tokens); i++)
   {
     char *token = getCacheToken(token_prefix, artworkinfo_tokens[i].text);
     char *value = getSetupValue(artworkinfo_tokens[i].type,