int offset = 0; LPSTR walkingPointer = aBuffer;
LPSTR NormalizeBuffer(LPSTR aBuffer){    int offset = 0;    LPSTR walkingPointer = aBuffer;    // trim all the 0x0D at the beginning (should be 1 at most, but hey...)    while (*walkingPointer++ == 0x0D) {        aBuffer++;    }        do {        // compact the buffer if needed        *(walkingPointer - offset) = *walkingPointer;        // skip the 0x0D        if (*walkingPointer == 0x0D) {            offset++;        }    } while (*walkingPointer++ != '\0');    return aBuffer;}