summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2019-11-07 05:11:12 +0100
committerGravatar Nikias Bassen2019-11-07 05:11:12 +0100
commitb1b60142523e35abc92677ed346a3687cb0eb708 (patch)
treeb7c108dd14244e54b2e90a19ff059732cb173dce /src
parent49cbc8df7672c4dd5fa0c73e9046ee91924ae4b8 (diff)
downloadlibplist-b1b60142523e35abc92677ed346a3687cb0eb708.tar.gz
libplist-b1b60142523e35abc92677ed346a3687cb0eb708.tar.bz2
xplist: Bail out when '.' is found while checking for ',' in double to string conversion
Diffstat (limited to 'src')
-rw-r--r--src/xplist.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xplist.c b/src/xplist.c
index fa6bb6d..a7d52e5 100644
--- a/src/xplist.c
+++ b/src/xplist.c
@@ -117,6 +117,8 @@ static size_t dtostr(char *buf, size_t bufsize, double realval)
if (buf[i] == ',') {
buf[i] = '.';
break;
+ } else if (buf[i] == '.') {
+ break;
}
}
}