From 0a9ca2633f74ab7deaa73b5651ede4af1ea4ece4 Mon Sep 17 00:00:00 2001 From: Araq Date: Sat, 10 Jan 2015 23:52:05 +0100 Subject: [PATCH] fixes #1866 --- src/db_sqlite.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/db_sqlite.nim b/src/db_sqlite.nim index bc9e0b5919..bf1ce75ef7 100644 --- a/src/db_sqlite.nim +++ b/src/db_sqlite.nim @@ -48,6 +48,7 @@ proc dbError*(msg: string) {.noreturn.} = raise e proc dbQuote(s: string): string = + if s.isNil: return "NULL" result = "'" for c in items(s): if c == '\'': add(result, "''") @@ -61,7 +62,7 @@ proc dbFormat(formatstr: TSqlQuery, args: varargs[string]): string = if c == '?': add(result, dbQuote(args[a])) inc(a) - else: + else: add(result, c) proc tryExec*(db: TDbConn, query: TSqlQuery,