summaryrefslogtreecommitdiffstats
path: root/core/parse-xml.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-08-04 23:52:39 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-11-09 19:19:04 +0100
commit80f123ce2aacc8f3180b0b7a56a027e4804ae498 (patch)
tree428107bb8ed2514321758b86a4c86bbea116f80c /core/parse-xml.c
parent794066b2367082851858d4e0da8b6e388d2acabb (diff)
downloadsubsurface-80f123ce2aacc8f3180b0b7a56a027e4804ae498.tar.gz
Parser: set timestamp to zero if parsing failed
When parsing of a timestamp failed (shouldn't happen) set the timestamp to zero. This should give less unpredictable results and silence a compiler warning. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/parse-xml.c')
-rw-r--r--core/parse-xml.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/parse-xml.c b/core/parse-xml.c
index bca0269a3..79a7b53e0 100644
--- a/core/parse-xml.c
+++ b/core/parse-xml.c
@@ -343,6 +343,7 @@ static void sampletime(char *buffer, duration_t *time)
time->seconds = (hr * 60 + min) * 60 + sec;
break;
default:
+ time->seconds = 0;
printf("Strange sample time reading %s\n", buffer);
}
}