boot: Fix some always false conditions
This commit is contained in:
@@ -283,7 +283,7 @@ translate_color(int32 color)
|
||||
15, 4, 2, 6, 1, 5, 3, 7,
|
||||
8, 12, 10, 14, 9, 13, 11, 0 };
|
||||
|
||||
if (color < 0 && color >= 16)
|
||||
if (color < 0 || color >= 16)
|
||||
return 0;
|
||||
return cmap[color];
|
||||
//return color;
|
||||
|
||||
@@ -71,11 +71,11 @@ check_cpu_features()
|
||||
fpu = 68060;
|
||||
else if (fpu_type & 0x8)
|
||||
fpu = 68040;
|
||||
else if (fpu_type & 0x6 == 0x6)
|
||||
else if ((fpu_type & 0x6) == 0x6)
|
||||
fpu = 68882;
|
||||
else if (fpu_type & 0x6 == 0x4)
|
||||
else if ((fpu_type & 0x6) == 0x4)
|
||||
fpu = 68881;
|
||||
else if (fpu_type & 0x6 == 0x2)
|
||||
else if ((fpu_type & 0x6) == 0x2)
|
||||
fpu = 68881; // not certain
|
||||
else if (fpu_type & 0x4) {
|
||||
panic("bad fpu");
|
||||
|
||||
@@ -77,9 +77,9 @@ VTConsole::SetColor(int32 foreground, int32 background)
|
||||
8, 12, 10, 14, 9, 13, 11, 0 };
|
||||
char buff[] = "\033b \033c ";
|
||||
|
||||
if (foreground < 0 && foreground >= 16)
|
||||
if (foreground < 0 || foreground >= 16)
|
||||
return;
|
||||
if (background < 0 && background >= 16)
|
||||
if (background < 0 || background >= 16)
|
||||
return;
|
||||
|
||||
buff[2] += cmap[foreground];
|
||||
|
||||
Reference in New Issue
Block a user