]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Use unsigned values when reading data from sqlite
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 21 Feb 2018 15:13:56 +0000 (15:13 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 21 Feb 2018 15:13:56 +0000 (15:13 +0000)
src/lua/lua_sqlite3.c

index 4cb900dd932ace0ca0ec1986f298da7feaad3f36..bb1fcdeba408b43fc4672b4dfb741b98b5394cdb 100644 (file)
@@ -222,11 +222,12 @@ lua_sqlite3_push_row (lua_State *L, sqlite3_stmt *stmt)
 
                switch (type) {
                case SQLITE_INTEGER:
-                       /* XXX: we represent int64 as strings, as we can nothing else to do
+                       /*
+                        * XXX: we represent int64 as strings, as we can nothing else to do
                         * about it portably
                         */
                        num = sqlite3_column_int64 (stmt, i);
-                       rspamd_snprintf (numbuf, sizeof (numbuf), "%L", num);
+                       rspamd_snprintf (numbuf, sizeof (numbuf), "%uL", num);
                        lua_pushstring (L, numbuf);
                        break;
                case SQLITE_FLOAT: