aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-02-12 18:29:34 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-02-12 18:29:34 +0100
commit1357d7ef716f175faffee2539fc4a9efd7219dab (patch)
tree58fe35604624cd99c73e7d556a03cb13e91e560b /main.c
parent8a1c7056747b0cc7e04db73dfa733854c73d66f0 (diff)
downloadvis-1357d7ef716f175faffee2539fc4a9efd7219dab.tar.gz
vis-1357d7ef716f175faffee2539fc4a9efd7219dab.tar.xz
vis: fix printf format string used in number_increment_decrement
The field width specifier '*' expects an int. be fine here since we are expecting a small positive number and the result is
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.c b/main.c
index 9169005..a8529f9 100644
--- a/main.c
+++ b/main.c
@@ -1688,10 +1688,10 @@ static const char *number_increment_decrement(Vis *vis, const char *keys, const
snprintf(fmt, sizeof fmt, "%lld", value);
} else if (hex) {
size_t len = strlen(number) - 2;
- snprintf(fmt, sizeof fmt, "0x%0*llx", len, value);
+ snprintf(fmt, sizeof fmt, "0x%0*llx", (int)len, value);
} else {
size_t len = strlen(number) - 1;
- snprintf(fmt, sizeof fmt, "0%0*llo", len, value);
+ snprintf(fmt, sizeof fmt, "0%0*llo", (int)len, value);
}
text_delete_range(txt, &r);
text_insert(txt, r.start, fmt, strlen(fmt));