Mercurial > hg
changeset 2168:87244845fd9c
Handle fractional seconds with more (or less) than 3 digits in timestamps
According to XEP-0082, the "fractional second addendum to Time MAY contain
any number of digits".
Reported by Holger.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Thu, 11 Dec 2014 20:19:37 +0100 |
parents | 634cc23e8c1c |
children | 4889f429fdd0 |
files | mcabber/mcabber/utils.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/mcabber/utils.c Fri Oct 17 22:42:07 2014 +0200 +++ b/mcabber/mcabber/utils.c Thu Dec 11 20:19:37 2014 +0100 @@ -429,7 +429,8 @@ int tzhrs, tzmins; if (*c == '.') /* dealing with precision we don't care about */ - c += 4; + while (isdigit(*++c)) + ; if ((*c == '+' || *c == '-') && sscanf(c+1, "%02d:%02d", &tzhrs, &tzmins)) {