aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/func.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/func.c b/src/func.c
index 6a279a9d7..c1efd8acf 100644
--- a/src/func.c
+++ b/src/func.c
@@ -1269,7 +1269,7 @@ static void unhexFunc(
const u8 *zHex = sqlite3_value_text(argv[0]);
int nHex = sqlite3_value_bytes(argv[0]);
#ifdef SQLITE_DEBUG
- const u8 *zEnd = &zHex[nHex];
+ const u8 *zEnd = zHex ? &zHex[nHex] : 0;
#endif
u8 *pBlob = 0;
u8 *p = 0;