mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-13 06:43:52 +00:00
fix db_mysql getRow() when column is null error raised (#12806) [backport]
* fix db_mysql getRow() * added if y == nil [backport]
This commit is contained in:
committed by
Andreas Rumpf
parent
0987872675
commit
208b018f6b
@@ -3412,9 +3412,10 @@ elif hasAlloc:
|
||||
{.push stack_trace:off, profiler:off.}
|
||||
proc add*(x: var string, y: cstring) =
|
||||
var i = 0
|
||||
while y[i] != '\0':
|
||||
add(x, y[i])
|
||||
inc(i)
|
||||
if y != nil:
|
||||
while y[i] != '\0':
|
||||
add(x, y[i])
|
||||
inc(i)
|
||||
{.pop.}
|
||||
|
||||
when defined(nimvarargstyped):
|
||||
|
||||
Reference in New Issue
Block a user