mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
a_dbus_convert_value(): Be less strict about wrong strings
The code doesn't check the type of any of the values that it converts. However, string elements are silently skipped if they cannot be converted. The proper fix would be to make this code check types. For now, it will be ok to "convert" non-strings to an empty string. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
8b3087dc4e
commit
82f74aa895
1 changed files with 3 additions and 2 deletions
5
dbus.c
5
dbus.c
|
@ -319,8 +319,9 @@ a_dbus_convert_value(lua_State *L, int idx, DBusMessageIter *iter)
|
|||
case dbustype: \
|
||||
{ \
|
||||
const char *s = lua_tostring(L, idx + 1); \
|
||||
if(s) \
|
||||
dbus_message_iter_append_basic(iter, dbustype, &s); \
|
||||
if(!s) \
|
||||
s = ""; \
|
||||
dbus_message_iter_append_basic(iter, dbustype, &s); \
|
||||
} \
|
||||
break;
|
||||
DBUS_MSG_RETURN_HANDLE_TYPE_STRING(DBUS_TYPE_STRING)
|
||||
|
|
Loading…
Reference in a new issue