summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/unicode/ntapi_uc_unicode_validation.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/unicode/ntapi_uc_unicode_validation.c b/src/unicode/ntapi_uc_unicode_validation.c
index 7596c98..4b43436 100644
--- a/src/unicode/ntapi_uc_unicode_validation.c
+++ b/src/unicode/ntapi_uc_unicode_validation.c
@@ -226,8 +226,10 @@ int32_t __stdcall __ntapi_uc_validate_unicode_stream_utf8(
ch = callback_args->src;
}
- if ((ch < ch_boundary) && (*ch == 0))
+ if ((ch < ch_boundary) && (*ch == 0)) {
+ callback_args->byte_count = 1;
return callback_fn[0](callback_args);
+ }
return NT_STATUS_SUCCESS;
}
@@ -329,8 +331,10 @@ int32_t __stdcall __ntapi_uc_validate_unicode_stream_utf16(
wch = callback_args->src;
}
- if ((wch < wch_boundary) && (*wch == 0))
+ if ((wch < wch_boundary) && (*wch == 0)) {
+ callback_args->byte_count = 1;
return callback_fn[0](callback_args);
+ }
return NT_STATUS_SUCCESS;
}