summaryrefslogtreecommitdiff
path: root/compiler/jvm
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2019-01-01 15:08:40 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2019-01-01 15:08:40 +0000
commit94e8af46c1eedca49786bff86f302987b5b0481f (patch)
treebb42275a1608ee8c911b0bfa7e8974cb2870718e /compiler/jvm
parent6e4a981ba0b3fa01e201c85b2f65b6ea96e3b5cb (diff)
downloadfpc-94e8af46c1eedca49786bff86f302987b5b0481f.tar.gz
* changed reverseparameters() from function into procedure: it does not make
sense as a function (the original input needed to be replaced by its result to make any sense), and someone already mistakenly used it like that in htypechk causing a bug/memory leak git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@40729 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/jvm')
-rw-r--r--compiler/jvm/njvminl.pas4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/jvm/njvminl.pas b/compiler/jvm/njvminl.pas
index f73c5bff8a..866fbd01af 100644
--- a/compiler/jvm/njvminl.pas
+++ b/compiler/jvm/njvminl.pas
@@ -521,7 +521,7 @@ implementation
function tjvminlinenode.first_setlength: tnode;
begin
{ reverse the parameter order so we can process them more easily }
- left:=reverseparameters(tcallparanode(left));
+ reverseparameters(tcallparanode(left));
{ treat setlength(x,0) specially: used to init uninitialised locations }
if not is_shortstring(left.resultdef) and
not assigned(tcallparanode(tcallparanode(left).right).right) and
@@ -535,7 +535,7 @@ implementation
{ strings are handled the same as on other platforms }
if left.resultdef.typ=stringdef then
begin
- left:=reverseparameters(tcallparanode(left));
+ reverseparameters(tcallparanode(left));
result:=inherited first_setlength;
exit;
end;