dc_tools: Make dc_create_id() safe

This commit is contained in:
Alexander Krotov
2019-07-29 14:19:43 +03:00
committed by Floris Bruynooghe
parent 73298c0273
commit 0b679f8b95
3 changed files with 51 additions and 39 deletions

View File

@@ -1494,7 +1494,7 @@ pub unsafe fn dc_create_group_chat(
let draft_txt =
CString::new(context.stock_string_repl_str(StockMessage::NewGroupDraft, as_str(chat_name)))
.unwrap();
let grpid = as_str(dc_create_id());
let grpid = dc_create_id();
if sql::execute(
context,
&context.sql,