Vagy lehet ringbuffert úgy, hogy a = *p++; if (p - buff >= sizeof(buff)) p = buff; Ma egész nap effélékkel pusztítottam magam. :)