Use epicsScanFloat/epicsScanDouble rather than sscanf.
This allows proper handling of Nan/Inf on all architectures.
This commit is contained in:
Vendored
+2
-2
@@ -37,7 +37,7 @@
|
||||
*-***************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <epicsStdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
@@ -198,7 +198,7 @@ double *pDouble /* O pointer to place to store value */
|
||||
|
||||
ptext = envGetConfigParam(pParam, sizeof text, text);
|
||||
if (ptext != NULL) {
|
||||
count = sscanf(text, "%lf", pDouble);
|
||||
count = epicsScanDouble(text, pDouble);
|
||||
if (count == 1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user