mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-26 03:02:15 -05:00
Fix OCR Bug. How could I have possibly overlooked it with the FIXME in there?
This commit is contained in:
parent
85419926a3
commit
d6c16560d5
@ -626,7 +626,7 @@ end;
|
|||||||
function TMOCR.GetUpTextAtEx(atX, atY: integer; shadow: boolean): string;
|
function TMOCR.GetUpTextAtEx(atX, atY: integer; shadow: boolean): string;
|
||||||
var
|
var
|
||||||
n:Tnormarray;
|
n:Tnormarray;
|
||||||
ww, hh,i,j: integer;
|
ww, hh,i,j,nl: integer;
|
||||||
font: TocrData;
|
font: TocrData;
|
||||||
chars, shadows, thachars: T2DPointArray;
|
chars, shadows, thachars: T2DPointArray;
|
||||||
t:Tpointarray;
|
t:Tpointarray;
|
||||||
@ -655,9 +655,10 @@ begin
|
|||||||
|
|
||||||
lbset:=false;
|
lbset:=false;
|
||||||
setlength(n, (font.width+1) * (font.height+1));
|
setlength(n, (font.width+1) * (font.height+1));
|
||||||
|
nl := high(n);
|
||||||
for j := 0 to high(thachars) do
|
for j := 0 to high(thachars) do
|
||||||
begin
|
begin
|
||||||
for i := 0 to high(n) do
|
for i := 0 to nl do
|
||||||
n[i] := 0;
|
n[i] := 0;
|
||||||
|
|
||||||
t:= thachars[j];
|
t:= thachars[j];
|
||||||
@ -684,7 +685,8 @@ begin
|
|||||||
}
|
}
|
||||||
for i := 0 to high(thachars[j]) do
|
for i := 0 to high(thachars[j]) do
|
||||||
begin
|
begin
|
||||||
n[(thachars[j][i].x) + ((thachars[j][i].y) * font.width)] := 1;
|
if (thachars[j][i].x) + ((thachars[j][i].y) * font.width) <= nl then
|
||||||
|
n[(thachars[j][i].x) + ((thachars[j][i].y) * font.width)] := 1;
|
||||||
end;
|
end;
|
||||||
result := result + GuessGlyph(n, font);
|
result := result + GuessGlyph(n, font);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user