Page 1 of 1

Bug in sqlite3 interface code

Posted: Mon Apr 18, 2005 12:11 pm
by nodrog_reversed
Hi,

I just started playing with newLisp and was trying the sqlite3 interface as supplied in the source code.

I found that there is a bug in the code - errors not being returned properly. So I'll submit it here. Sorry if this is the wrong part of the forum - or if this is well kown and already addressed.

The new code is:

(define (set-error)
(set 'result (sqlite3_errmsg db))
(if (= result 0)
(set 'error-message "")
(set 'error-message (get-string result))))

Fix is in last line - in the source it did (get-string error-message) but should be (get-string result).

Cheers,
Gordon.

Posted: Mon Apr 18, 2005 12:24 pm
by Lutz
Welcome to the group Gordon, and thanks for the correction, this will be changed in the next development release.

Lutz