mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-22 13:31:34 +02:00
* fix aspell runtime error in windows if no library (register keys) are present
git-svn-id: trunk@10348 -
This commit is contained in:
parent
7a114d46c1
commit
141defd182
@ -1013,7 +1013,6 @@ uses
|
|||||||
|
|
||||||
var
|
var
|
||||||
LibHandle: TLibHandle = 0;
|
LibHandle: TLibHandle = 0;
|
||||||
AspellInited_: Boolean;
|
|
||||||
|
|
||||||
{$IFDEF WINDOWS}
|
{$IFDEF WINDOWS}
|
||||||
function RegistryQueryValue (name,sub:shortstring):shortstring;
|
function RegistryQueryValue (name,sub:shortstring):shortstring;
|
||||||
@ -1057,10 +1056,12 @@ begin
|
|||||||
|
|
||||||
{$IFDEF windows}
|
{$IFDEF windows}
|
||||||
bversion := RegistryQueryValue('SOFTWARE\Aspell','AspellVersion');
|
bversion := RegistryQueryValue('SOFTWARE\Aspell','AspellVersion');
|
||||||
move(bversion[1], version, 4);
|
if Length(bversion) >= 4 then begin
|
||||||
path := RegistryQueryValue('SOFTWARE\Aspell','Path');
|
move(bversion[1], version, 4);
|
||||||
// will work if they passed %s, won't bork if they passed absolute
|
path := RegistryQueryValue('SOFTWARE\Aspell','Path');
|
||||||
libname := path + PathDelim + StringReplace(libn, '%s', IntToStr(Version), [rfReplaceAll]);
|
// will work if they passed %s, won't bork if they passed absolute
|
||||||
|
libname := path + PathDelim + StringReplace(libn, '%s', IntToStr(Version), [rfReplaceAll]);
|
||||||
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
LibHandle := LoadLibrary(libname);
|
LibHandle := LoadLibrary(libname);
|
||||||
|
Loading…
Reference in New Issue
Block a user