From 380a5608aa97758aef7821df16fb50af953dd6c3 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Tue, 24 Sep 2013 23:40:46 +0000 Subject: [PATCH] ICU-10439 fix sprintf(%s,NULL) X-SVN-Rev: 34469 --- icu4c/source/test/intltest/intltest.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/icu4c/source/test/intltest/intltest.cpp b/icu4c/source/test/intltest/intltest.cpp index c788e9a96db..8a717e4ad89 100644 --- a/icu4c/source/test/intltest/intltest.cpp +++ b/icu4c/source/test/intltest/intltest.cpp @@ -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)); -- 2.40.0