In ORIGINAL:
EDB_Status EDB::open(unsigned long head_ptr)
{
EDB_head_ptr = head_ptr;
// Thanks to Steve Kelly for the next line...
EDB_table_ptr = sizeof(EDB_Header) + EDB_head_ptr; // this line was originally missing in the downloaded library
readHead();
return EDB_OK;
}
CORRECT:
EDB_Status EDB::open(unsigned long head_ptr)
{
EDB_head_ptr = head_ptr;
// Thanks to Steve Kelly for the next line...
EDB_table_ptr = sizeof(EDB_Header) + EDB_head_ptr; // this line was originally missing in the downloaded library
readHead();
if (EDB_head.flag == EDB_FLAG){
return EDB_OK;
} else {
return EDB_ERROR;
}
//return EDB_OK;
}
In ORIGINAL: EDB_Status EDB::open(unsigned long head_ptr) { EDB_head_ptr = head_ptr; // Thanks to Steve Kelly for the next line... EDB_table_ptr = sizeof(EDB_Header) + EDB_head_ptr; // this line was originally missing in the downloaded library readHead(); return EDB_OK; }
CORRECT: EDB_Status EDB::open(unsigned long head_ptr) { EDB_head_ptr = head_ptr; // Thanks to Steve Kelly for the next line... EDB_table_ptr = sizeof(EDB_Header) + EDB_head_ptr; // this line was originally missing in the downloaded library readHead(); if (EDB_head.flag == EDB_FLAG){ return EDB_OK; } else { return EDB_ERROR; } //return EDB_OK; }