From: Davin McCall Date: Thu, 23 Jun 2016 10:00:32 +0000 (+0100) Subject: Fix bug in buffer pointer calculation X-Git-Tag: v0.04~17 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f81a4754b76d0d913bfb369b1ccd16587ae879bb;p=oweals%2Fdinit.git Fix bug in buffer pointer calculation --- diff --git a/src/cpbuffer.h b/src/cpbuffer.h index eb77523..1478b74 100644 --- a/src/cpbuffer.h +++ b/src/cpbuffer.h @@ -26,7 +26,7 @@ template class CPBuffer int pos = cur_idx + index; if (pos >= SIZE) pos -= SIZE; - return &buf[cur_idx]; + return &buf[pos]; } char * get_buf_base()