Skip to content

Commit ade5a93

Browse files
committed
Call calloc with Uint16 instead of Utf16
1 parent 23cdc0f commit ade5a93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎test/number_format_compact_icu_test.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ String FormatWithUnumf(String locale, String skeleton, num number) {
201201
expect(errorCode, equals(15), // U_BUFFER_OVERFLOW_ERROR
202202
reason: u_errorName!(errorCode).toString());
203203
cErrorCode.value = 0;
204-
final buffer = calloc<Utf16>(reqLen + 1);
204+
final buffer = calloc<Uint16>(reqLen + 1).cast<Utf16>();
205205
unumf_resultToString!(uresult, buffer, reqLen + 1, cErrorCode);
206206
errorCode = cErrorCode.value;
207207
expect(errorCode, lessThanOrEqualTo(0),

0 commit comments

Comments
 (0)