Hello,

On Sun, Jan 16, 2011 at 9:41 PM, Drake Wilson <dr...@begriffli.ch> wrote:
> Quoth "Navaneeth.K.N" <navaneet...@gmail.com>, on 2011-01-16 21:31:42 +0530:
>>     rc = sqlite3_bind_text(stmt, 2, tok->pattern, VARNAM_SYMBOL_MAX,
>> NULL);  /* debugged and tok->pattern doesn't have any extra
>> characters. strlen(tok->pattern) return 1 */
>
> ... and yet you're passing a length of VARNAM_SYMBOL_MAX instead,
> which I'm guessing is not 1.  Pass the real length of the string (not
> the size of the buffer), or -1 to treat it as a NUL-terminated C
> string.  Otherwise you're grabbing extra bogus bytes.

Awesome! It worked. I was expecting the function will stop reading
characters when it finds a NULL terminator. Thanks for correcting it.

-- 
Navaneeth
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to