]> git.sesse.net Git - vlc/blobdiff - src/modules/entry.c
modules: remove an unused define and assert if we try to add too many shortcuts.
[vlc] / src / modules / entry.c
index df7277bd5de06c00b510866bb28f74a18decf912..cf99b081adb8d244619536b1380f8c1cd6d58349 100644 (file)
@@ -189,6 +189,9 @@ int vlc_plugin_set (module_t *module, module_config_t *item, int propid, ...)
         {
             unsigned i_shortcuts = va_arg (ap, unsigned);
             unsigned index = module->i_shortcuts;
+            /* The cache loader accept only a small number of shortcuts */
+            assert(i_shortcuts + index <= MODULE_SHORTCUT_MAX);
+
             const char *const *tab = va_arg (ap, const char *const *);
             const char **pp = realloc (module->pp_shortcuts,
                                        sizeof (pp[0]) * (index + i_shortcuts));