Mercurial > hg > nnchat
comparison th_string.c @ 244:517c7b22b3c9
Buffer pointer handling was wrong in th_vaddch(), fixed.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 20 Apr 2011 18:55:19 +0300 |
parents | 589f5e37dd91 |
children | 3dc86d8eb0a9 |
comparison
equal
deleted
inserted
replaced
243:589f5e37dd91 | 244:517c7b22b3c9 |
---|---|
461 void th_vputch(char **buf, size_t *bufsize, size_t *len, const char ch) | 461 void th_vputch(char **buf, size_t *bufsize, size_t *len, const char ch) |
462 { | 462 { |
463 if (!th_growbuf(buf, bufsize, len, 1)) | 463 if (!th_growbuf(buf, bufsize, len, 1)) |
464 return; | 464 return; |
465 | 465 |
466 *buf[*len] = ch; | 466 (*buf)[*len] = ch; |
467 (*len)++; | 467 (*len)++; |
468 } | 468 } |
469 | 469 |
470 | 470 |
471 void th_vputs(char **buf, size_t *bufsize, size_t *len, const char *str) | 471 void th_vputs(char **buf, size_t *bufsize, size_t *len, const char *str) |