Mercurial > hg > nnchat
comparison nnchat.c @ 34:f5d335771b16
Fix a bug with mixed editBuf->pos vs editBuf->len.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 05 Aug 2008 14:39:21 +0300 |
parents | e49ea6febfeb |
children | c725b0dc6268 |
comparison
equal
deleted
inserted
replaced
33:e49ea6febfeb | 34:f5d335771b16 |
---|---|
989 int histPos = 0, histMax = 0; | 989 int histPos = 0, histMax = 0; |
990 | 990 |
991 memset(histBuf, 0, sizeof(histBuf)); | 991 memset(histBuf, 0, sizeof(histBuf)); |
992 | 992 |
993 /* Initialize */ | 993 /* Initialize */ |
994 th_init("NNChat", "Newbie Nudes chat client", "0.5", | 994 th_init("NNChat", "Newbie Nudes chat client", "0.6", |
995 "Written and designed by Anonymous Finnish Guy (C) 2008", | 995 "Written and designed by Anonymous Finnish Guy (C) 2008", |
996 "This software is freeware, use and distribute as you wish."); | 996 "This software is freeware, use and distribute as you wish."); |
997 th_verbosityLevel = 0; | 997 th_verbosityLevel = 0; |
998 | 998 |
999 /* Parse arguments */ | 999 /* Parse arguments */ |
1175 | 1175 |
1176 histPos = 0; | 1176 histPos = 0; |
1177 histBuf[1] = copyBuf(editBuf); | 1177 histBuf[1] = copyBuf(editBuf); |
1178 if (histMax < SET_MAX_HISTORY) histMax++; | 1178 if (histMax < SET_MAX_HISTORY) histMax++; |
1179 | 1179 |
1180 insertBuf(editBuf, editBuf->pos, 0); | 1180 insertBuf(editBuf, editBuf->len, 0); |
1181 result = handleUserInput(tmpSocket, editBuf->data, editBuf->len); | 1181 result = handleUserInput(tmpSocket, editBuf->data, editBuf->len); |
1182 | 1182 |
1183 clearBuf(editBuf); | 1183 clearBuf(editBuf); |
1184 | 1184 |
1185 if (result < 0) { | 1185 if (result < 0) { |