Skip to content

Commit

Permalink
fix: use a volatile read in BaseRevision::is_supported
Browse files Browse the repository at this point in the history
Fixes #28
  • Loading branch information
lylythechosenone committed Apr 5, 2024
1 parent 265cb74 commit b581cbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl BaseRevision {

/// Check whether the given revision is supported by the bootloader.
pub fn is_supported(&self) -> bool {
(unsafe { *self.revision.get() }) == 0
(unsafe { self.revision.get().read_volatile() }) == 0
}
}
unsafe impl Sync for BaseRevision {}
Expand Down

0 comments on commit b581cbd

Please sign in to comment.