comparison src/audacious/tuple_compiler.c @ 3818:10a72af488d9 trunk

Fix a stupid bug in memory reallocation of the evaluator.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 20 Oct 2007 06:05:53 +0300
parents 5ea2431c12bf
children c597262d6d50
comparison
equal deleted inserted replaced
3817:5ea2431c12bf 3818:10a72af488d9
731 if (str) { 731 if (str) {
732 /* (Re)allocate res for more space, if needed. */ 732 /* (Re)allocate res for more space, if needed. */
733 *reslen += strlen(str); 733 *reslen += strlen(str);
734 if (*res) { 734 if (*res) {
735 if (*reslen >= *resmax) { 735 if (*reslen >= *resmax) {
736 *resmax += MIN_ALLOC_BUF; 736 *resmax += *reslen + MIN_ALLOC_BUF;
737 *res = g_realloc(*res, *resmax); 737 *res = g_realloc(*res, *resmax);
738 } 738 }
739 739
740 strcat(*res, str); 740 strcat(*res, str);
741 } else { 741 } else {