mirror of https://github.com/BOINC/boinc.git
SCR: Improve validity testing of settings on Mac Screensaver control panel.
This commit is contained in:
parent
ab59d88af4
commit
38adc14676
|
@ -552,24 +552,28 @@ print_to_log_file(" Entered closeSheetSave");
|
|||
gBlankingTime = [ mBlankingTimeString intValue ];
|
||||
scanner = [ NSScanner scannerWithString:mBlankingTimeString];
|
||||
if (![ scanner scanInt:&period ]) goto Bad;
|
||||
if (![ scanner isAtEnd ]) goto Bad;
|
||||
if ((period < 0) || (period > 999)) goto Bad;
|
||||
gBlankingTime = period;
|
||||
|
||||
mDefaultPeriodString = [ mDefaultPeriodTextField stringValue ];
|
||||
scanner2 = [ scanner initWithString:mDefaultPeriodString];
|
||||
if (![ scanner2 scanInt:&period ]) goto Bad;
|
||||
if (![ scanner2 isAtEnd ]) goto Bad;
|
||||
if ((period < 0) || (period > 999)) goto Bad;
|
||||
setGFXDefaultPeriod((double)(period * 60));
|
||||
|
||||
mSciencePeriodString = [ mSciencePeriodTextField stringValue ];
|
||||
scanner2 = [ scanner initWithString:mSciencePeriodString];
|
||||
if (![ scanner2 scanInt:&period ]) goto Bad;
|
||||
if (![ scanner2 isAtEnd ]) goto Bad;
|
||||
if ((period < 0) || (period > 999)) goto Bad;
|
||||
setGFXSciencePeriod((double)(period * 60));
|
||||
|
||||
mChangePeriodString = [ mChangePeriodTextField stringValue ];
|
||||
scanner2 = [ scanner initWithString:mChangePeriodString];
|
||||
if (![ scanner2 scanInt:&period ]) goto Bad;
|
||||
if (![ scanner2 isAtEnd ]) goto Bad;
|
||||
if ((period < 0) || (period > 999)) goto Bad;
|
||||
setGGFXChangePeriod((double)(period * 60));
|
||||
|
||||
|
|
Loading…
Reference in New Issue