You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
}
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: