add a sanity check for the snap offset, limiting it to 50

This commit is contained in:
Dana Jansens 2002-08-03 17:05:09 +00:00
parent dba5b809ec
commit 08e28f38a9

View file

@ -684,6 +684,8 @@ void BScreen::load_rc(void) {
if (! config->getValue(screenstr + "edgeSnapOffset", if (! config->getValue(screenstr + "edgeSnapOffset",
resource.snap_offset)) resource.snap_offset))
resource.snap_offset = 0; resource.snap_offset = 0;
if (resource.snap_offset > 50) // sanity check, setting this huge would
resource.snap_offset = 50; // seriously suck.
if (! config->getValue(screenstr + "edgeSnapThreshold", if (! config->getValue(screenstr + "edgeSnapThreshold",
resource.snap_threshold)) resource.snap_threshold))