File: getcold.c.patch

package info (click to toggle)
python-fitsio 1.3.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,020 kB
  • sloc: python: 7,963; ansic: 3,962; makefile: 10
file content (38 lines) | stat: -rw-r--r-- 1,632 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- a/getcold.c
+++ b/getcold.c
@@ -1418,7 +1418,7 @@ int fffr4r8(float *input,         /* I - array of values to be converted     */
                         nullarray[ii] = 1;
                   }
                   else            /* it's an underflow */
-                     output[ii] = 0;
+                     output[ii] = (double) input[ii];
               }
               else
                 output[ii] = (double) input[ii];
@@ -1439,7 +1439,7 @@ int fffr4r8(float *input,         /* I - array of values to be converted     */
                         nullarray[ii] = 1;
                   }
                   else            /* it's an underflow */
-                     output[ii] = zero;
+                     output[ii] = input[ii] * scale + zero;
               }
               else
                   output[ii] = input[ii] * scale + zero;
@@ -1519,7 +1519,7 @@ int fffr8r8(double *input,        /* I - array of values to be converted     */
                     }
                   }
                   else            /* it's an underflow */
-                     output[ii] = 0;
+                     output[ii] = input[ii];
               }
               else
                   output[ii] = input[ii];
@@ -1544,7 +1544,7 @@ int fffr8r8(double *input,        /* I - array of values to be converted     */
                     }
                   }
                   else            /* it's an underflow */
-                     output[ii] = zero;
+                     output[ii] = input[ii] * scale + zero;
               }
               else
                   output[ii] = input[ii] * scale + zero;