diff options
author | Thomas Adam <thomas@xteddy.org> | 2017-01-31 00:01:12 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2017-01-31 00:01:12 +0000 |
commit | d8da761d54ed0d2b449e412511496e67ce8d33ac (patch) | |
tree | 56606ce4edbee5b9c57aaf7f6691e1dd9e077ce5 /options.c | |
parent | 9094f01c6bf3de3cca17a3303a46adce268d9107 (diff) | |
parent | 3408595f77920764bf6c4c313a0abc6a1cfb8048 (diff) | |
download | rtmux-d8da761d54ed0d2b449e412511496e67ce8d33ac.tar.gz rtmux-d8da761d54ed0d2b449e412511496e67ce8d33ac.tar.bz2 rtmux-d8da761d54ed0d2b449e412511496e67ce8d33ac.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'options.c')
-rw-r--r-- | options.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -325,7 +325,7 @@ options_isstring(struct options_entry *o) } const char * -options_tostring(struct options_entry *o, int idx) +options_tostring(struct options_entry *o, int idx, int numeric) { static char s[1024]; const char *tmp; @@ -355,7 +355,10 @@ options_tostring(struct options_entry *o, int idx) tmp = attributes_tostring(o->number); break; case OPTIONS_TABLE_FLAG: - tmp = (o->number ? "on" : "off"); + if (numeric) + xsnprintf(s, sizeof s, "%lld", o->number); + else + tmp = (o->number ? "on" : "off"); break; case OPTIONS_TABLE_CHOICE: tmp = o->tableentry->choices[o->number]; |