mirror of
https://codeberg.org/scip/dbtool.git
synced 2025-12-16 19:00:58 +01:00
fix berkeley db key deletion
This commit is contained in:
@@ -562,8 +562,9 @@ void Engine::regexp() {
|
||||
*/
|
||||
void Engine::remove() {
|
||||
init();
|
||||
#ifdef HAVE_BERKELEY
|
||||
Dbt key((char *)config.key.c_str(), config.key.length() + 1);
|
||||
#ifdef HAVE_BERKELEY
|
||||
char *k = (char *)config.key.c_str();
|
||||
Dbt key(k, strlen(k));
|
||||
int ret;
|
||||
if((ret = db->del(NULL, &key, 0)) != 0) {
|
||||
cerr << "Database error" << "(" << strerror(ret) << ")" << endl;
|
||||
|
||||
Reference in New Issue
Block a user