Derek Atkins' patch to the rpc backend.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3810 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2001-03-20 22:18:50 +00:00
parent 1b7983a41b
commit 256be7a33a

View File

@ -1199,8 +1199,16 @@ static void rpcend_do_build_gncquery (gncQuery *gq, gncQuery *from_q,
case PD_STRING:
PINFO ("BLAH... It's a string. I hope it doesn't have a Regex!");
default:
/* Allocate the right size */
if (toRpc) {
term = malloc (sizeof (*term));
memcpy (term, andlist->qt, sizeof (*term));
memset (term, 0, sizeof (*term));
} else {
term = malloc (sizeof (*qt));
memset (term, 0, sizeof (*qt));
}
/* Only copy the smaller size */
memcpy (term, andlist->qt, MIN(sizeof (*qt), sizeof(*term)));
}
/* Set the predicate for non-rpc copies */