Ticket Hash: | 201128cc8893e3d92ddf1b3e1e89a5f653f006ee | ||
Title: | SQLite3.GetParamValueBytes optimization | ||
Status: | Closed | Type: | Code_Defect |
Severity: | Minor | Priority: | Immediate |
Subsystem: | Integration_Via_PInvoke | Resolution: | Fixed |
Last Modified: | 2011-07-07 04:34:49 | ||
Version Found In: |
Description: | ||||
Current:
nlen = UnsafeNativeMethods.sqlite3_value_bytes(p); ptr = UnsafeNativeMethods.sqlite3_value_blob(p); if (bDest == null) return nlen; Need: nlen = UnsafeNativeMethods.sqlite3_value_bytes(p); if (bDest == null) return nlen; if (nCopied + nStart > bDest.Length) nCopied = bDest.Length - nStart; if (nCopied + nDataOffset > nlen) nCopied = nlen - nDataOffset; if (nCopied > 0) { ptr = UnsafeNativeMethods.sqlite3_value_blob(p); Marshal.Copy((IntPtr)(ptr.ToInt64() + nDataOffset), bDest, nStart, nCopied); } else nCopied = 0; mistachkin added on 2011-07-05 10:18:17 UTC: anonymous added on 2011-07-05 13:55:47 UTC: 2) ptr.ToInt32() -> ptr.ToInt64() mistachkin added on 2011-07-07 02:41:02 UTC: mistachkin added on 2011-07-07 04:19:24 UTC: |