summaryrefslogtreecommitdiffhomepage
path: root/src/internal/ntapi_log.h
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-05-11 15:15:48 -0400
committermidipix <writeonce@midipix.org>2016-05-14 07:18:26 -0400
commit62cbabd799b4989d8028031e5c2e27304d45e437 (patch)
tree67cc53526508d103d7e809176c0233d036e6f31c /src/internal/ntapi_log.h
parent77a5639d60ea60c3628fd009bb97d5c74a097352 (diff)
downloadntapi-62cbabd799b4989d8028031e5c2e27304d45e437.tar.bz2
ntapi-62cbabd799b4989d8028031e5c2e27304d45e437.tar.xz
__ntapi_log_write(): properly handle signedness.
Diffstat (limited to 'src/internal/ntapi_log.h')
-rw-r--r--src/internal/ntapi_log.h4
1 files changed, 2 insertions, 2 deletions
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(