Corrected string escape calculation.

This commit is contained in:
Ilia Alshanetsky 2004-03-07 21:57:50 +00:00
parent 0dd2280102
commit 0eb7000b0a
2 changed files with 3 additions and 3 deletions

View file

@ -142,7 +142,7 @@ PS_WRITE_FUNC(sqlite)
t = time(NULL);
binary = emalloc(1 + 5 + vallen * (256 / 253));
binary = emalloc(1 + 5 + vallen * ((float) 256 / (float) 253));
binlen = sqlite_encode_binary((const unsigned char*)val, vallen, binary);
rv = sqlite_exec_printf(db, "REPLACE INTO session_data VALUES('%q', '%q', %d)", NULL, NULL, &error, key, binary, t);