aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--com32/modules/chain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/modules/chain.c b/com32/modules/chain.c
index 9ca118c0..2f79aaf4 100644
--- a/com32/modules/chain.c
+++ b/com32/modules/chain.c
@@ -626,7 +626,7 @@ static int hide_unhide(char *mbr, int part)
for (i = 1; i <= 4; i++) {
pt = (struct part_entry *)&mbr[0x1be + 16*(i-1)];
t = pt->ostype;
- if ((mask >> (t & ~0x10)) & 1) {
+ if ((t <= 0x1f) && ((mask >> (t & ~0x10)) & 1)) {
/* It's a hideable partition type */
if (i == part)
t &= ~0x10; /* unhide */