Separate library that holds helper functions for the main OMF code.

Revision:
13:61d3de73a844
Parent:
12:8fb2bb26528f
Child:
14:6ed67a160616
--- a/osisoft-omf.cpp	Wed Mar 28 17:37:10 2018 +0000
+++ b/osisoft-omf.cpp	Wed Mar 28 20:51:27 2018 +0000
@@ -52,7 +52,12 @@
 string OMFLib_float_to_string(float f) {
     char buffer[20];
     int n = sprintf (buffer, "%f", f);
-    return string(buffer);
+    // Return -1 if a parse failure ocurred
+    if (string(buffer) == "NaN") {
+        return string("-1");
+    } else {
+        return string(buffer);
+    }
 }
 
 // ************************************************************************