command: fix wrong sizeof() argument

Found by coverity.

All of these cases happened to work, probably even in 32 bit (when the
name pointer allowed it to use only 4 bytes of space).
This commit is contained in:
wm4
2017-02-20 13:47:35 +01:00
parent e5df57c755
commit 64b1a656c7
+1 -1
View File
@@ -354,7 +354,7 @@ int mp_on_set_option(void *ctx, struct m_config_option *co, void *data, int flag
bstr bname = bstr0(name);
char tmp[50];
if (bstr_eatend0(&bname, "*")) {
snprintf(tmp, sizeof(name), "%.*s", BSTR_P(bname));
snprintf(tmp, sizeof(tmp), "%.*s", BSTR_P(bname));
name = tmp;
}