Browse Source

FIX: alloc'ed wrong size for string on restore

git-svn-id: svn://svn.lighttpd.net/xcache/branches/1.0@100 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
1.0
Xuefer 15 years ago
parent
commit
c81e06c77a
  1. 2
      processor/string.m4

2
processor/string.m4

@ -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')

Loading…
Cancel
Save