Browse Source

* allow widechar for indexing arrays, fixes 4115

git-svn-id: trunk@497 -
peter 20 years ago
parent
commit
05c241072e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/nmem.pas

+ 1 - 1
compiler/nmem.pas

@@ -652,7 +652,7 @@ implementation
          { maybe type conversion for the index value, but
            do not convert enums,booleans,char }
          if (right.resulttype.def.deftype<>enumdef) and
-            not(is_char(right.resulttype.def)) and
+            not(is_char(right.resulttype.def) or is_widechar(right.resulttype.def)) and
             not(is_boolean(right.resulttype.def)) then
            begin
              inserttypeconv(right,sinttype);