From 25ef6de088f52f2f74ab4c385bc73e2c4f2cfc79 Mon Sep 17 00:00:00 2001 From: Wen Jia Liu Date: Fri, 19 Jun 2015 15:46:55 +0000 Subject: [PATCH] Fix PhCountStringZ bug --- phlib/basesup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phlib/basesup.c b/phlib/basesup.c index 5838be367..470d56d8a 100644 --- a/phlib/basesup.c +++ b/phlib/basesup.c @@ -572,7 +572,7 @@ SIZE_T PhCountStringZ( if ((ULONG_PTR)p & 0xe) { - ULONG unalignedCount = (ULONG)((ULONG_PTR)p & 0xe) / 2; + ULONG unalignedCount = (0x10 - (ULONG)((ULONG_PTR)p & 0xe)) / 2; do {