mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Safeguard to prevent users from choosing invalid options.
This commit is contained in:
@@ -97,7 +97,14 @@ namespace GHelper.Helpers
|
|||||||
//3 = Shutdown
|
//3 = Shutdown
|
||||||
private static int GetDefaultLidAction()
|
private static int GetDefaultLidAction()
|
||||||
{
|
{
|
||||||
return AppConfig.Get("clamshell_default_lid_action", 1);
|
int val = AppConfig.Get("clamshell_default_lid_action", 1);
|
||||||
|
|
||||||
|
if (val < 0 || val > 3)
|
||||||
|
{
|
||||||
|
val = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user