-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hi
I think there are two bugs in the code:
-
when you perform the open of the file (line 243)
cdb_ = fs_.open(fileName);
should be
cdb_ = fs_.open(fileName,"r"); -
in case the database contains few records the hashTabSlotsNum_ at line 331 becomes equal to 0 if the searched key is not present so the division at line 336 takes a fault.
As fix probably is better to add the following statement after line 334
if (hashTabSlotsNum_ == 0) {
return (state_ = KEY_NOT_FOUND);
}
Metadata
Metadata
Assignees
Labels
No labels