* fixed used resulttype of char-to-shortstring typeconversion in case the

shortstring type is smaler than 255 chars

git-svn-id: trunk@40628 -
This commit is contained in:
Jonas Maebe 2018-12-24 22:09:45 +00:00
parent 765fdb7641
commit b1b559f283

View File

@ -423,10 +423,10 @@ interface
case tstringdef(resultdef).stringtype of
st_shortstring :
begin
tg.gethltemp(current_asmdata.CurrAsmList,cshortstringtype,256,tt_normal,location.reference);
tg.gethltemp(current_asmdata.CurrAsmList,resultdef,resultdef.size,tt_normal,location.reference);
tmpref:=location.reference;
hlcg.g_ptrtypecast_ref(current_asmdata.CurrAsmList,
cpointerdef.getreusable(cshortstringtype),
cpointerdef.getreusable(resultdef),
cpointerdef.getreusable(left.resultdef),tmpref);
hlcg.a_load_loc_ref(current_asmdata.CurrAsmList,left.resultdef,left.resultdef,left.location,
tmpref);