summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-04-01 22:32:34 +0200
committerwm4 <wm4@nowhere>2015-04-01 22:32:34 +0200
commit9e98702493068b28cbbbed56ff6b91e60c5e3b46 (patch)
tree2193c56330f96860a46323fef0eb3720661d67ef /options
parentf5603cba2359767a1c4be2713a9acd031e021d02 (diff)
downloadmpv-9e98702493068b28cbbbed56ff6b91e60c5e3b46.tar.bz2
mpv-9e98702493068b28cbbbed56ff6b91e60c5e3b46.tar.xz
options: fix --geometry to string conversion
Fixes #1744.
Diffstat (limited to 'options')
-rw-r--r--options/m_option.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/options/m_option.c b/options/m_option.c
index 49d78a06d2..26ed7a2457 100644
--- a/options/m_option.c
+++ b/options/m_option.c
@@ -2014,13 +2014,9 @@ static char *print_geometry(const m_option_t *opt, const void *val)
APPEND_PER(h, h_per);
}
if (gm->xy_valid) {
- res = talloc_asprintf_append(res, "+");
- if (gm->x_sign)
- res = talloc_asprintf_append(res, "-");
+ res = talloc_asprintf_append(res, gm->x_sign ? "-" : "+");
APPEND_PER(x, x_per);
- res = talloc_asprintf_append(res, "+");
- if (gm->y_sign)
- res = talloc_asprintf_append(res, "-");
+ res = talloc_asprintf_append(res, gm->y_sign ? "-" : "+");
APPEND_PER(y, y_per);
}
}