diff --git a/include/codeb.c b/include/codeb.c index c3ff11abc..372938829 100755 --- a/include/codeb.c +++ b/include/codeb.c @@ -432,8 +432,11 @@ int DB_rewrite(int handle) u4delay_sec(); #endif rt=DB_unlock(handle); - if (rt == r4unique) + if (rt == e4unique) + { + DB_get_error(); fatal_box("Errore : chiave duplicata nell' indice %d", dbdata[handle]->rec_num + 1); + } return (rt); } @@ -463,13 +466,14 @@ int DB_add(int handle) u4delay_sec(); #endif } - if (rt == r4unique) + if (rt == e4unique) { + DB_get_error(); if (data->rec_num > 0) fatal_box("Errore : chiave duplicata nell' indice %d", data->rec_num + 1); else rt = _isreinsert; - } + } DB_unlock(handle); return(rt); }