diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-02-12 18:29:34 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-02-12 18:29:34 +0100 |
| commit | 1357d7ef716f175faffee2539fc4a9efd7219dab (patch) | |
| tree | 58fe35604624cd99c73e7d556a03cb13e91e560b | |
| parent | 8a1c7056747b0cc7e04db73dfa733854c73d66f0 (diff) | |
| download | vis-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
| -rw-r--r-- | main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)); |
