Fixed errors in string_to_int.
--- a/lib/iec_std_lib.h Sun Jan 04 17:21:33 2009 +0100
+++ b/lib/iec_std_lib.h Sun Jan 04 17:23:06 2009 +0100
@@ -559,7 +559,7 @@
shift += 1;
}else if( c >= '.' ){ /* reset value */
res = 0;
- fac = 1;
+ fac = IN->body[0] == '-' ? -1 : 1;
shift = 0;
}
}
--- a/lib/iec_types.h Sun Jan 04 17:21:33 2009 +0100
+++ b/lib/iec_types.h Sun Jan 04 17:23:06 2009 +0100
@@ -52,7 +52,7 @@
#endif
#ifndef STR_LEN_TYPE
-#define STR_LEN_TYPE uint8_t
+#define STR_LEN_TYPE int8_t
#endif
typedef STR_LEN_TYPE __strlen_t;