mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 10:39:18 +02:00
* empty ansistring now use constant value of 0
This commit is contained in:
parent
6fa1a1bae0
commit
9fc6896bf9
@ -187,8 +187,17 @@ implementation
|
|||||||
l,j,
|
l,j,
|
||||||
i,mylength : longint;
|
i,mylength : longint;
|
||||||
begin
|
begin
|
||||||
lastlabel:=nil;
|
{ for empty ansistrings we could return a constant 0 }
|
||||||
|
if is_ansistring(p^.resulttype) and
|
||||||
|
(p^.length=0) then
|
||||||
|
begin
|
||||||
|
p^.location.loc:=LOC_MEM;
|
||||||
|
p^.location.reference.is_immediate:=true;
|
||||||
|
p^.location.reference.offset:=0;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
{ const already used ? }
|
{ const already used ? }
|
||||||
|
lastlabel:=nil;
|
||||||
if not assigned(p^.lab_str) then
|
if not assigned(p^.lab_str) then
|
||||||
begin
|
begin
|
||||||
if is_shortstring(p^.resulttype) then
|
if is_shortstring(p^.resulttype) then
|
||||||
@ -431,7 +440,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.45 2000-02-09 13:22:46 peter
|
Revision 1.46 2000-06-18 18:09:31 peter
|
||||||
|
* empty ansistring now use constant value of 0
|
||||||
|
|
||||||
|
Revision 1.45 2000/02/09 13:22:46 peter
|
||||||
* log truncated
|
* log truncated
|
||||||
|
|
||||||
Revision 1.44 2000/01/07 01:14:20 peter
|
Revision 1.44 2000/01/07 01:14:20 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user