From: RĂ©mi Denis-Courmont Date: Mon, 28 Dec 2009 09:30:10 +0000 (+0200) Subject: Check that hotkeys are sorted properly (debug-only self-test) X-Git-Tag: 1.1.0-ff~1676 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=1b7540c4e7db9d419566bf36aac08aaa6f559895;p=vlc Check that hotkeys are sorted properly (debug-only self-test) --- diff --git a/src/libvlc.c b/src/libvlc.c index a6e6b69cbf..c3087573ef 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -824,6 +824,15 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, p_keys[i].i_key = config_GetInt( p_libvlc, libvlc_actions[i].name ); p_keys[i].i_action = libvlc_actions[i].value; +#ifndef NDEBUG + if (i > 0 + && strcmp(libvlc_actions[i-1].name, libvlc_actions[i].name) >= 0) + { + msg_Err(p_libvlc, "%s and %s are not ordered properly", + libvlc_actions[i-1].name, libvlc_actions[i].name); + abort(); + } +#endif } p_keys[libvlc_actions_count].psz_action = NULL; p_keys[libvlc_actions_count].i_key = 0;