Change to unsigned char to avoid MSVC assertion

Change to unsigned char to avoid MSVC assertion