From d9e3889463670dd1198b45792829c3c526ae6a69 Mon Sep 17 00:00:00 2001 From: DenioD <41270280+DenioD@users.noreply.github.com> Date: Wed, 24 Jun 2020 09:32:20 +0200 Subject: [PATCH] fix bad_alloc --- lib/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/lib.rs b/lib/src/lib.rs index f1be0d3..3314c90 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -102,7 +102,7 @@ pub extern fn litelib_initialize_new(server: *const c_char) -> *mut c_char { /// Restore a wallet from the seed phrase #[no_mangle] pub extern fn litelib_initialize_new_from_phrase(server: *const c_char, - seed: *const c_char, birthday: u64, number: u64) -> *mut c_char { + seed: *const c_char, birthday: u64, number: u64, overwrite: bool) -> *mut c_char { let server_str = unsafe { assert!(!server.is_null()); @@ -124,7 +124,7 @@ pub extern fn litelib_initialize_new_from_phrase(server: *const c_char, } }; - let lightclient = match LightClient::new_from_phrase(seed_str, &config, birthday, number, false) { + let lightclient = match LightClient::new_from_phrase(seed_str, &config, birthday, number, overwrite) { Ok(l) => l, Err(e) => { let e_str = CString::new(format!("Error: {}", e)).unwrap();