From 62cbabd799b4989d8028031e5c2e27304d45e437 Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 11 May 2016 15:15:48 -0400 Subject: __ntapi_log_write(): properly handle signedness. --- src/internal/ntapi_log.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/internal/ntapi_log.h') diff --git a/src/internal/ntapi_log.h b/src/internal/ntapi_log.h index 108bc18..ae9cce9 100644 --- a/src/internal/ntapi_log.h +++ b/src/internal/ntapi_log.h @@ -32,7 +32,7 @@ static inline ssize_t __ntapi_log_write(void * msg,uint32_t size) void * hlog; nt_iosb iosb; uintptr_t buffer[8] = {0}; - char * ch = (char *)buffer; + unsigned char * ch = (unsigned char *)buffer; if (!(hlog = __ntapi_internals()->rtdata->hlog)) return NT_STATUS_INVALID_HANDLE; @@ -52,7 +52,7 @@ static inline ssize_t __ntapi_log_write(void * msg,uint32_t size) hlog, 0,0,0,&iosb, buffer, - (uint32_t)(ch-(char *)buffer), + (uint32_t)(ch-(unsigned char *)buffer), 0,0); status = __ntapi->zw_write_file( -- cgit v1.2.3