ECC-1491: Pseudo GRIB: The offset and count keys are incorrect

This commit is contained in:
Shahram Najm 2022-12-06 13:51:51 +00:00
parent fe1f32d9bc
commit b1337d386a
2 changed files with 11 additions and 0 deletions

View File

@ -437,6 +437,8 @@ static int read_PSEUDO(reader* r, const char* type)
i++;
}
r->offset = r->tell(r->read_data) - 4;
for (j = 0; j < 3; j++) {
if (r->read(r->read_data, &tmp[i], 1, &err) != 1 || err)
return err;

View File

@ -47,5 +47,14 @@ ${tools_dir}/grib_ls -jm $tempOut
ms=`${tools_dir}/grib_get -p mars.step $tempOut`
[ "$ms" = "19" ]
# ECC-1491
cat ${data_dir}/budg ${data_dir}/budg > $tempBud
${tools_dir}/grib_get -p count,offset $tempBud > $tempOut
cat > $tempRef << EOF
1 0
2 6000
EOF
diff $tempRef $tempOut
rm -f $tempRef $tempOut $tempBud