diff options
author | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 10:41:41 +0900 |
---|---|---|
committer | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 10:41:41 +0900 |
commit | 5bac1fdb02d2d460a8c6bb7566c7944746485bdb (patch) | |
tree | 0d306ce7b9fa1119617db51b21617ecec34dc248 /device-functions.c | |
parent | 940af2b34debdbe03ba9c01d90d72f9e51ea811c (diff) |
slew cal points are not aligned on 4-byte boundaries; fix #1
Diffstat (limited to 'device-functions.c')
-rw-r--r-- | device-functions.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/device-functions.c b/device-functions.c index e173d3b..3853422 100644 --- a/device-functions.c +++ b/device-functions.c @@ -3196,7 +3196,11 @@ int Get_VI_Rng_Info(int parameter, int channel, int calibration_point_number, in +x_range*max_polarity*max_points +x_polarity*max_points +x_entry; - if ( fabs(pwl[index])<smallest_allowed_number && (num_in_current_range==x_entry+1)) { + + /* fix non-aligned float access */ + float temp; + memcpy(&temp, (float *)(pwl + index), sizeof(float)); + if ( fabs(temp)<smallest_allowed_number && (num_in_current_range==x_entry+1)) { --num_in_current_range; } } |