Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
pwmt
zathura
Commits
39cdfdb9
Commit
39cdfdb9
authored
Apr 30, 2017
by
Sebastian Ramacher
Browse files
Bind correctly
Signed-off-by:
Sebastian Ramacher
<
sebastian+dev@ramacher.at
>
parent
ae97de3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
zathura/database-sqlite.c
View file @
39cdfdb9
...
...
@@ -778,8 +778,14 @@ sqlite_get_recent_files(zathura_database_t* db, int max, const char* basepath)
max
=
INT_MAX
;
}
if
(
sqlite3_bind_int
(
stmt
,
1
,
max
)
!=
SQLITE_OK
&&
(
basepath
==
NULL
||
sqlite3_bind_text
(
stmt
,
2
,
basepath
,
-
1
,
NULL
)
!=
SQLITE_OK
))
{
bool
failed
=
false
;
if
(
basepath
!=
NULL
)
{
failed
=
sqlite3_bind_int
(
stmt
,
2
,
max
)
!=
SQLITE_OK
||
sqlite3_bind_text
(
stmt
,
1
,
basepath
,
-
1
,
NULL
)
!=
SQLITE_OK
;
}
else
{
failed
=
sqlite3_bind_int
(
stmt
,
1
,
max
)
!=
SQLITE_OK
;
}
if
(
failed
==
true
)
{
sqlite3_finalize
(
stmt
);
girara_error
(
"Failed to bind arguments."
);
return
false
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment