Browse Source

* fixed crash with temp ansistring indexing

peter 26 years ago
parent
commit
abbd27e3df
1 changed files with 6 additions and 2 deletions
  1. 6 2
      compiler/cg386mem.pas

+ 6 - 2
compiler/cg386mem.pas

@@ -734,7 +734,8 @@ implementation
            for example
            for example
          }
          }
          if (p^.location.loc=LOC_MEM) and
          if (p^.location.loc=LOC_MEM) and
-           (p^.left^.resulttype^.deftype=stringdef) then
+            assigned(p^.left) and
+            (p^.left^.resulttype^.deftype=stringdef) then
            begin
            begin
               case pstringdef(p^.left^.resulttype)^.string_typ of
               case pstringdef(p^.left^.resulttype)^.string_typ of
                  st_ansistring:
                  st_ansistring:
@@ -849,7 +850,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.27  1999-02-04 11:44:46  florian
+  Revision 1.28  1999-02-04 17:16:51  peter
+    * fixed crash with temp ansistring indexing
+
+  Revision 1.27  1999/02/04 11:44:46  florian
     * fixed indexed access of ansistrings to temp. ansistring, i.e.
     * fixed indexed access of ansistrings to temp. ansistring, i.e.
       c:=(s1+s2)[i], the temp is now correctly remove and the generated
       c:=(s1+s2)[i], the temp is now correctly remove and the generated
       code is also fixed
       code is also fixed