diff --git a/src/common/common_memory.h b/src/common/common_memory.h index 5a8a606f6..66250f13b 100644 --- a/src/common/common_memory.h +++ b/src/common/common_memory.h @@ -32,10 +32,10 @@ class MTX_DLL_API memory_c { public: typedef unsigned char X; - explicit memory_c(X *p = NULL, int s = 0, bool f = false): // allocate a new counter + explicit memory_c(void *p = NULL, int s = 0, bool f = false): // allocate a new counter its_counter(NULL) { if (p) - its_counter = new counter(p, s, f); + its_counter = new counter((unsigned char *)p, s, f); } ~memory_c() {