From 62cbabd799b4989d8028031e5c2e27304d45e437 Mon Sep 17 00:00:00 2001 From: midipix Date: May 14 2016 11:18:26 +0000 Subject: __ntapi_log_write(): properly handle signedness. --- 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(