# HG changeset patch # User Matti Hamalainen # Date 1217936361 -10800 # Node ID f5d335771b16eb6512c8a09aa46178e2d28ac8a4 # Parent e49ea6febfebc8d35b574b1e70141cc727b1be07 Fix a bug with mixed editBuf->pos vs editBuf->len. diff -r e49ea6febfeb -r f5d335771b16 nnchat.c --- a/nnchat.c Tue Aug 05 08:42:57 2008 +0300 +++ b/nnchat.c Tue Aug 05 14:39:21 2008 +0300 @@ -991,7 +991,7 @@ memset(histBuf, 0, sizeof(histBuf)); /* Initialize */ - th_init("NNChat", "Newbie Nudes chat client", "0.5", + th_init("NNChat", "Newbie Nudes chat client", "0.6", "Written and designed by Anonymous Finnish Guy (C) 2008", "This software is freeware, use and distribute as you wish."); th_verbosityLevel = 0; @@ -1177,7 +1177,7 @@ histBuf[1] = copyBuf(editBuf); if (histMax < SET_MAX_HISTORY) histMax++; - insertBuf(editBuf, editBuf->pos, 0); + insertBuf(editBuf, editBuf->len, 0); result = handleUserInput(tmpSocket, editBuf->data, editBuf->len); clearBuf(editBuf);