浏览代码

compiler: check left node to be ord const diring widechar/unicodechar to shortstring before executing the code related to tordconstn()

git-svn-id: trunk@19566 -
paul 14 年之前
父节点
当前提交
435b72bcb1
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      compiler/ncnv.pas

+ 1 - 0
compiler/ncnv.pas

@@ -1082,6 +1082,7 @@ implementation
          else
            if (tstringdef(resultdef).stringtype=st_shortstring) and
               (torddef(left.resultdef).ordtype=uwidechar) and
+              (left.nodetype=ordconstn) and
               (tcompilerwidechar(tordconstnode(left).value.uvalue) <= 127)
            then
              begin