ICU-10439 fix sprintf(%s,NULL)

X-SVN-Rev: 34469
This commit is contained in:
Steven R. Loomis 2013-09-24 23:40:46 +00:00
parent 22f108c028
commit 380a5608aa

View file

@ -1790,6 +1790,9 @@ UBool IntlTest::assertFalse(const char* message, UBool condition, UBool quiet) {
}
UBool IntlTest::assertSuccess(const char* message, UErrorCode ec, UBool possibleDataError, const char *file, int line) {
if( file==NULL ) {
file = ""; // prevent failure if no file given
}
if (U_FAILURE(ec)) {
if (possibleDataError) {
dataerrln("FAIL: %s:%d: %s (%s)", file, line, message, u_errorName(ec));