summaryrefslogtreecommitdiff
path: root/gfx/fig.c
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/fig.c')
-rw-r--r--gfx/fig.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gfx/fig.c b/gfx/fig.c
index 8ae7721..a60e41b 100644
--- a/gfx/fig.c
+++ b/gfx/fig.c
@@ -297,6 +297,7 @@ static bool fig_args(void *ctx, int argc, char *const *argv)
const char *template = NULL;
const char **vars = NULL;
int n_vars = 0;
+ const char *colon;
char c;
FILE *file;
int lines_to_colors = 8;
@@ -304,7 +305,8 @@ static bool fig_args(void *ctx, int argc, char *const *argv)
while ((c = getopt(argc, argv, "o:t:D:")) != EOF)
switch (c) {
case 'o':
- output = optarg;
+ colon = strchr(optarg, ':');
+ output = colon ? colon + 1 : optarg;
break;
case 't':
template = optarg;