mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 11:09:42 +02:00
* do not interpret procsyms followed by ./^/( as potential procvar
expressions in case of TP/Mac-style procvar modes (mantis #21073) git-svn-id: trunk@20062 -
This commit is contained in:
parent
1177fadc1c
commit
56161e608d
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -12118,6 +12118,7 @@ tests/webtbs/tw20995a.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw20995b.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw20998.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw21029.pp svneol=native#text/plain
|
||||
tests/webtbs/tw21073.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2109.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2110.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2128.pp svneol=native#text/plain
|
||||
|
@ -899,8 +899,9 @@ implementation
|
||||
getaddr:=true;
|
||||
end
|
||||
else
|
||||
if (m_tp_procvar in current_settings.modeswitches) or
|
||||
(m_mac_procvar in current_settings.modeswitches) then
|
||||
if ((m_tp_procvar in current_settings.modeswitches) or
|
||||
(m_mac_procvar in current_settings.modeswitches)) and
|
||||
not(token in [_CARET,_POINT,_LKLAMMER]) then
|
||||
begin
|
||||
aprocdef:=Tprocsym(sym).Find_procdef_byprocvardef(getprocvardef);
|
||||
if assigned(aprocdef) then
|
||||
|
26
tests/webtbs/tw21073.pp
Normal file
26
tests/webtbs/tw21073.pp
Normal file
@ -0,0 +1,26 @@
|
||||
{ %norun }
|
||||
|
||||
{$mode delphi}
|
||||
|
||||
program gpabugtest;
|
||||
|
||||
TYPE TGetCurrentProcess = function : THandle; stdcall;
|
||||
TGetProcAddress = function(const hModule : THandle; const lpProcName : PAnsiChar) : Pointer; stdcall;
|
||||
|
||||
function GetProcAddress(const hModule : THandle;const lpProcName : PAnsiChar) : Pointer; stdcall;
|
||||
begin
|
||||
result:=nil;
|
||||
end;
|
||||
|
||||
function GetModuleHandle(const lpModuleName : PWideChar) : THandle; stdcall;
|
||||
begin
|
||||
result:=thandle(-1);
|
||||
end;
|
||||
|
||||
var proc_GetCurrentProcess : TGetCurrentProcess;
|
||||
proc_GetProcAddress : TGetProcAddress;
|
||||
|
||||
begin
|
||||
{no error} proc_GetCurrentProcess:=GetProcAddress(GetModuleHandle('Kernel32'),'GetCurrentProcess');
|
||||
{error ??} proc_GetProcAddress:= GetProcAddress(GetModuleHandle('Kernel32'),'GetProcAddress');
|
||||
end.
|
Loading…
Reference in New Issue
Block a user