Thursday, November 27, 2003, 5:21:46 AM, Dennis Volodomanov wrote:
> [...]
> ----8<----
> unsigned char out[15000];
> memcpy((BYTE*)&out,mybuf,photo_length);
> out[photo_length]='\0';
> int size=sqlite_decode_binary(out,out);
> if(size<0)
> {
> // now we don't even get here
> }
> ----8<----
If mybuf comes from the database then it should already be NUL
terminated. It doesn't need to be copied, sqlite_decode_binary does
that for you.
unsigned char out[15000];
int size=sqlite_decode_binary(mybuf,out); // should be enough
OR just
int size=sqlite_decode_binary(mybuf,mybuf); // just the binary needed
e
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]