_e_info_server_cb_selected_buffer_dump(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
{
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
- const char *win_id_s = NULL;
+ const char *win_str = NULL;
const char *path = NULL;
- int32_t win_id = 0;
+ uint64_t win_id = 0;
+ unsigned long tmp;
Evas_Object *o;
- int ret;
+ Eina_Bool res = EINA_FALSE;
Dump_Win_Data *dump = NULL;
E_Capture_Save_State state;
- if (!eldbus_message_arguments_get(msg, "ss", &win_id_s, &path))
+ if (!eldbus_message_arguments_get(msg, "ss", &win_str, &path))
{
ERR("Error getting arguments.");
return reply;
}
- if (!win_id_s) win_id = 0;
- else
- {
- if (strlen(win_id_s) >= 2 && win_id_s[0] == '0' && win_id_s[1] == 'x')
- ret = sscanf(win_id_s, "%zx", (uintptr_t *)&win_id);
- else
- ret = sscanf(win_id_s, "%d", &win_id);
- EINA_SAFETY_ON_FALSE_GOTO(ret == 1, end);
- }
+ if (strlen(win_str) >= 2 && win_str[0] == '0' && win_str[1] == 'x')
+ res = e_util_string_to_ulong(win_str, &tmp, 16);
+ else
+ res = e_util_string_to_ulong(win_str, &tmp, 10);
+
+ EINA_SAFETY_ON_FALSE_GOTO(res == EINA_TRUE, end);
+
+ win_id = (uint64_t)tmp;
for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
{