currentPosition=memchr(currentPosition,'G',size-(size_t)(currentPosition-data)-3);//-3 to ensure that we don't overrun the buffer during the strncmp() call.
currentPosition=(unsignedchar*)memchr(currentPosition,'G',size-(size_t)(currentPosition-data)-3);//-3 to ensure that we don't overrun the buffer during the strncmp() call.