diff options
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; } } |