1
0
Fork 0

FIX: alloc'ed wrong size for string on restore

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@100 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
This commit is contained in:
Xuefer 2006-08-27 03:45:38 +00:00
parent 0d578c04c0
commit 567b1054ba
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ define(`PROC_STRING_N_EX', `
IFCALC(`xc_calc_string_n(processor, ISTYPE, (void *) $2, `$3' IFASSERT(`, __LINE__'));')
IFSTORE(`$1 = (STRTYPE *) xc_store_string_n(processor, ISTYPE, (char *) $2, `$3' IFASSERT(`, __LINE__'));')
IFRESTORE(`
ALLOC(`$1', `STRTYPE', `sizeof(STRTYPE) * ($3)')
ALLOC(`$1', `STRTYPE', `($3)')
memcpy($1, $2, sizeof(STRTYPE) * ($3));
')
FIXPOINTER_EX(`STRTYPE', `$1')