summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2010-11-30 14:27:57 -0500
committerDave Reisner <d@falconindy.com>2010-11-30 14:27:57 -0500
commit4e2438f6e7f39eec105f33d5708a2cfa49117246 (patch)
treeacc0e40e4270de2ef53dc1d47b908bb689c8794c
parent916cc07a4b16e3ff2af3920ed496f0d3697b50b6 (diff)
downloadexpac-4e2438f6e7f39eec105f33d5708a2cfa49117246.tar.xz
fix bug in verify_format
-rw-r--r--expac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/expac.c b/expac.c
index 16d84b6..1e84d85 100644
--- a/expac.c
+++ b/expac.c
@@ -437,7 +437,7 @@ int verify_format_string(const char *format) {
if (*p == '%' && !strchr(FORMAT_TOKENS, *++p)) {
fprintf(stderr, "error: bad token in format string: %%%c\n", *p);
return(1);
- } else if (*p == '\\' && !strchr(ESCAPE_TOKENS, *p)) {
+ } else if (*p == '\\' && !strchr(ESCAPE_TOKENS, *++p)) {
fprintf(stderr, "error: bad token in format string: \\%c\n", *p);
return(1);
}
@@ -476,7 +476,7 @@ int main(int argc, char *argv[]) {
for (i = targets; i; i = alpm_list_next(i)) {
ret += print_pkg(dblist, alpm_list_getdata(i), format);
}
- ret = !!ret;
+ ret = !!ret; /* clamp to zero/one */
if (freelist) {
alpm_list_free(dblist);