PeachOS icon indicating copy to clipboard operation
PeachOS copied to clipboard

Bug in fat16_get_first_cluster

Open gierens opened this issue 2 years ago • 2 comments

Correct me if I'm wrong but we are just ORing the high and low bits here: https://github.com/nibblebits/PeachOS/blob/9518f7a15134c31d66a4efe5a67a8ffba67edf50/src/fs/fat/fat16.c#L355-L358

Shouldn't we shift the high bits like so:

return (item->high_16_bits_first_cluster << 16) | item->low_16_bits_first_cluster;

gierens avatar Nov 16 '23 20:11 gierens

Yes you are correct, this function by the end of the course does not get used anymore, it will be removed in a future lecture entirely

nibblebits avatar Nov 16 '23 20:11 nibblebits

Thanks for mentioning the issue

nibblebits avatar Nov 16 '23 20:11 nibblebits