Commit 72f17419 authored by Owen Rudge's avatar Owen Rudge Committed by Alexandre Julliard

comctl32/monthcal: Check both min and max ranges in IsDateInValidRange.

parent e3ab9936
......@@ -353,14 +353,17 @@ static BOOL MONTHCAL_IsDateInValidRange(const MONTHCAL_INFO *infoPtr,
else if(MONTHCAL_CompareSystemTime(date, &min_allowed_date) == -1) {
fix_st = &min_allowed_date;
}
else if(infoPtr->rangeValid & GDTR_MAX) {
if((MONTHCAL_CompareSystemTime(date, &infoPtr->maxDate) == 1)) {
fix_st = &infoPtr->maxDate;
else {
if(infoPtr->rangeValid & GDTR_MAX) {
if((MONTHCAL_CompareSystemTime(date, &infoPtr->maxDate) == 1)) {
fix_st = &infoPtr->maxDate;
}
}
}
else if(infoPtr->rangeValid & GDTR_MIN) {
if((MONTHCAL_CompareSystemTime(date, &infoPtr->minDate) == -1)) {
fix_st = &infoPtr->minDate;
if(infoPtr->rangeValid & GDTR_MIN) {
if((MONTHCAL_CompareSystemTime(date, &infoPtr->minDate) == -1)) {
fix_st = &infoPtr->minDate;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment