X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=uemis.c;fp=uemis.c;h=c7b16766bde611c1d4965d37214f1bf17c49931b;hb=831df38e05c8b120818a5296c59cea9d09637a62;hp=5450bf38dc16e9ee462cd2bdc188866ae72d4ff4;hpb=312eaed464f9a569575c36226b77c9299d3bf38a;p=ext%2Fsubsurface.git diff --git a/uemis.c b/uemis.c index 5450bf3..c7b1676 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