summaryrefslogtreecommitdiffstats
path: root/uemis.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2011-10-20 13:11:26 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2011-10-20 13:11:26 -0700
commit831df38e05c8b120818a5296c59cea9d09637a62 (patch)
tree63cdfe0345b0514f9f21495c2a862c7a978919cd /uemis.c
parent312eaed464f9a569575c36226b77c9299d3bf38a (diff)
downloadsubsurface-831df38e05c8b120818a5296c59cea9d09637a62.tar.gz
Fixed off by one error in uemis importer
I clearly had never tried this with a dive that used the "just air" setting the uemis. With this fix the cylinder data for that one tank is read correctly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'uemis.c')
-rw-r--r--uemis.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/uemis.c b/uemis.c
index 5450bf38d..c7b16766b 100644
--- a/uemis.c
+++ b/uemis.c
@@ -198,6 +198,8 @@ void uemis_parse_divelog_binary(char *base64, void *datap) {
gasoffset = template = *(uint8_t *)(data+115);
if (template == 3)
gasoffset = 4;
+ if (template == 0)
+ template = 1;
for (i = 0; i < template; i++) {
float volume = *(float *)(data+116+25*(gasoffset + i)) * 1000.0;
/* uemis always assumes a working pressure of 202.6bar (!?!?) - I first thought