Browse Source

* fixed char array, which can start with all possible values

peter 26 years ago
parent
commit
034eab82f3
2 changed files with 9 additions and 4 deletions
  1. 5 2
      compiler/tcadd.pas
  2. 4 2
      compiler/types.pas

+ 5 - 2
compiler/tcadd.pas

@@ -476,7 +476,7 @@ implementation
            { is one of the operands a string?,
              chararrays are also handled as strings (after conversion) }
            if (rd^.deftype=stringdef) or (ld^.deftype=stringdef) or
-              is_chararray(rd) or is_chararray(ld) then
+              (is_chararray(rd) and is_chararray(ld)) then
             begin
               if is_widestring(rd) or is_widestring(ld) then
                 begin
@@ -1017,7 +1017,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.22  1999-02-22 02:15:43  peter
+  Revision 1.23  1999-03-02 22:52:19  peter
+    * fixed char array, which can start with all possible values
+
+  Revision 1.22  1999/02/22 02:15:43  peter
     * updates for ag386bin
 
   Revision 1.21  1999/01/20 21:05:09  peter

+ 4 - 2
compiler/types.pas

@@ -332,7 +332,6 @@ unit types;
     function is_chararray(p : pdef) : boolean;
       begin
         is_chararray:=(p^.deftype=arraydef) and
-                      (parraydef(p)^.lowrange=0) and
                       is_equal(parraydef(p)^.definition,cchardef);
       end;
 
@@ -1284,7 +1283,10 @@ unit types;
 end.
 {
   $Log$
-  Revision 1.53  1999-02-25 21:02:57  peter
+  Revision 1.54  1999-03-02 22:52:20  peter
+    * fixed char array, which can start with all possible values
+
+  Revision 1.53  1999/02/25 21:02:57  peter
     * ag386bin updates
     + coff writer