Skip to content

Commit 35446a3

Browse files
jwpjrdevAndy-Python-Programmer
authored andcommitted
fix(kernel): DRM overflow
1 parent 3cf547b commit 35446a3

File tree

1 file changed

+2
-2
lines changed
  • src/aero_kernel/src/drivers/drm

1 file changed

+2
-2
lines changed

src/aero_kernel/src/drivers/drm/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,8 +1093,8 @@ fn make_dmt_modes(max_width: u16, max_height: u16) -> Vec<DrmModeInfo> {
10931093

10941094
// Sort the modes by display size:
10951095
result.sort_by(|e, f| {
1096-
(e.hdisplay * e.vdisplay)
1097-
.partial_cmp(&(f.hdisplay * f.vdisplay))
1096+
((e.hdisplay as usize) * (e.vdisplay as usize))
1097+
.partial_cmp(&((f.hdisplay as usize) * (f.vdisplay as usize)))
10981098
.unwrap() // unreachable
10991099
});
11001100

0 commit comments

Comments
 (0)