浏览代码

* fixed typecast error in last char/widechar/widestring patch

git-svn-id: trunk@8358 -
Jonas Maebe 18 年之前
父节点
当前提交
30e618ccb6
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      compiler/ncnv.pas

+ 2 - 1
compiler/ncnv.pas

@@ -893,7 +893,8 @@ implementation
       begin
          result:=nil;
          if (left.nodetype=stringconstn) and
-            ((tstringdef(left.resultdef).stringtype<>st_widestring) or
+            ((not is_widechararray(left.resultdef) and
+              not is_widestring(left.resultdef)) or
              (tstringdef(resultdef).stringtype=st_widestring) or
              { non-ascii chars would be replaced with '?' -> loses info }
              not hasnonasciichars(pcompilerwidestring(tstringconstnode(left).value_str))) then