mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 09:46:12 +02:00
* fixed crash with empty codepage
git-svn-id: trunk@234 -
This commit is contained in:
parent
4766e62dd2
commit
edffc31139
@ -176,11 +176,11 @@ unit charset;
|
|||||||
hp : punicodemap;
|
hp : punicodemap;
|
||||||
|
|
||||||
const
|
const
|
||||||
mapcache : string = '';
|
|
||||||
mapcachep : punicodemap = nil;
|
mapcachep : punicodemap = nil;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if (mapcache=s) and (mapcachep^.cpname=s) then
|
if assigned(mapcachep) and
|
||||||
|
(mapcachep^.cpname=s) then
|
||||||
begin
|
begin
|
||||||
getmap:=mapcachep;
|
getmap:=mapcachep;
|
||||||
exit;
|
exit;
|
||||||
@ -191,7 +191,6 @@ unit charset;
|
|||||||
if hp^.cpname=s then
|
if hp^.cpname=s then
|
||||||
begin
|
begin
|
||||||
getmap:=hp;
|
getmap:=hp;
|
||||||
mapcache:=s;
|
|
||||||
mapcachep:=hp;
|
mapcachep:=hp;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user