mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1003246 - Loosening assertion to allow for other valid inputs. r=jwatt
This commit is contained in:
parent
87e73b4f59
commit
9629e0c513
@ -188,12 +188,12 @@ nsresult nsDateTimeFormatMac::FormatTMTime(nsILocale* locale,
|
|||||||
CFSTR("h"), CFSTR("H"),
|
CFSTR("h"), CFSTR("H"),
|
||||||
CFRangeMake(0, CFStringGetLength(newFormat)),
|
CFRangeMake(0, CFStringGetLength(newFormat)),
|
||||||
0);
|
0);
|
||||||
NS_ASSERTION(replaceCount == 1, "Unexpected number of \"h\" occurrences");
|
NS_ASSERTION(replaceCount <= 2, "Unexpected number of \"h\" occurrences");
|
||||||
replaceCount = CFStringFindAndReplace(newFormat,
|
replaceCount = CFStringFindAndReplace(newFormat,
|
||||||
CFSTR("a"), CFSTR(""),
|
CFSTR("a"), CFSTR(""),
|
||||||
CFRangeMake(0, CFStringGetLength(newFormat)),
|
CFRangeMake(0, CFStringGetLength(newFormat)),
|
||||||
0);
|
0);
|
||||||
NS_ASSERTION(replaceCount == 1, "Unexpected number of \"a\" occurrences");
|
NS_ASSERTION(replaceCount <= 1, "Unexpected number of \"a\" occurrences");
|
||||||
CFDateFormatterSetFormat(formatter, newFormat);
|
CFDateFormatterSetFormat(formatter, newFormat);
|
||||||
CFRelease(newFormat); // note we don't own oldFormat
|
CFRelease(newFormat); // note we don't own oldFormat
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user