Remove erroneous code duplicating FIX_STRING functionality, adjust ansistring array size
--- a/project_files/hwc/rtl/pas2c.h Mon Nov 19 21:10:54 2018 +0300
+++ b/project_files/hwc/rtl/pas2c.h Mon Nov 19 21:51:46 2018 +0100
@@ -7,7 +7,7 @@
#include <math.h>
#define MAX_PARAMS 64
-#define MAX_ANSISTRING_LENGTH 16383
+#define MAX_ANSISTRING_LENGTH 16382
typedef union string255_
{
--- a/project_files/hwc/rtl/system.c Mon Nov 19 21:10:54 2018 +0300
+++ b/project_files/hwc/rtl/system.c Mon Nov 19 21:51:46 2018 +0100
@@ -277,7 +277,7 @@
FIX_STRINGA(str);
- p = strchr(str.s + 1, c);
+ p = strchr(str.str, c);
if (p == NULL) {
return 0;
@@ -302,9 +302,7 @@
FIX_STRING(substr);
FIX_STRINGA(str);
- str.s[str.len] = 0;
-
- p = strstr(str.s + 1, substr.str);
+ p = strstr(str.str, substr.str);
if (p == NULL) {
return 0;