summaryrefslogtreecommitdiffhomepage
path: root/src/unicode
diff options
context:
space:
mode:
Diffstat (limited to 'src/unicode')
-rw-r--r--src/unicode/ntapi_uc_unicode_validation.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/unicode/ntapi_uc_unicode_validation.c b/src/unicode/ntapi_uc_unicode_validation.c
index 7241509..dbdf4e1 100644
--- a/src/unicode/ntapi_uc_unicode_validation.c
+++ b/src/unicode/ntapi_uc_unicode_validation.c
@@ -251,6 +251,7 @@ int32_t __stdcall __ntapi_uc_validate_unicode_stream_utf16(
__in ntapi_uc_utf16_callback_fn ** callback_fn __optional,
__in nt_utf16_callback_args * callback_args __optional)
{
+ int32_t status;
const wchar16_t * wch_trail;
wchar16_t * wch_boundary;
unsigned char byte_count;
@@ -314,7 +315,9 @@ int32_t __stdcall __ntapi_uc_validate_unicode_stream_utf16(
if (byte_count) {
(*code_points)++;
callback_args->byte_count = byte_count;
- callback_fn[byte_count](callback_args);
+
+ if ((status = callback_fn[byte_count](callback_args)))
+ return status;
} else {
if (addr_failed)
*addr_failed = (void *)wch;
@@ -326,7 +329,7 @@ int32_t __stdcall __ntapi_uc_validate_unicode_stream_utf16(
}
if ((wch < wch_boundary) && (*wch == 0))
- callback_fn[0](callback_args);
+ return callback_fn[0](callback_args);
return NT_STATUS_SUCCESS;
}