diff --git a/libics_read.c b/libics_read.c index 90d3b66..6f4371f 100644 --- a/libics_read.c +++ b/libics_read.c @@ -1039,7 +1039,7 @@ Ics_Error IcsReadIcs(Ics_Header *icsStruct, for (sj = 0, si = 0; si < parameters; si++) { if (si == bits) { icsStruct->imel.origin = origin[si]; - icsStruct->imel.scale = scale[i]; + icsStruct->imel.scale = scale[si]; strcpy(icsStruct->imel.unit, unit[si]); } else { icsStruct->dim[sj].size = sizes[si];