You've already forked lazarus-ccr
fpspreadsheet: Fix some range-overflows in BIFFExplorer
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2949 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -2293,7 +2293,7 @@ var
|
|||||||
numBytes: Integer;
|
numBytes: Integer;
|
||||||
w: Word;
|
w: Word;
|
||||||
dw: DWord;
|
dw: DWord;
|
||||||
encint: Integer;
|
encint: DWord;
|
||||||
encdbl: QWord;
|
encdbl: QWord;
|
||||||
dbl: Double absolute encdbl;
|
dbl: Double absolute encdbl;
|
||||||
s: String;
|
s: String;
|
||||||
@ -2320,7 +2320,7 @@ begin
|
|||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
s := Format('$%.16x', [-59000000]);
|
s := Format('$%.16x', [-59000000]);
|
||||||
encint := ((dw and $FFFFFFFC) shr 2) or (dw and $C0000000);
|
encint := ((dw and DWord($FFFFFFFC)) shr 2) or (dw and DWord($C0000000));
|
||||||
// "arithmetic shift" = replace left-most bits by original bits
|
// "arithmetic shift" = replace left-most bits by original bits
|
||||||
if dw and $00000001 = 1 then
|
if dw and $00000001 = 1 then
|
||||||
s := FloatToStr(encint*0.01)
|
s := FloatToStr(encint*0.01)
|
||||||
@ -3649,16 +3649,16 @@ begin
|
|||||||
3: s := '(theme)';
|
3: s := '(theme)';
|
||||||
else s := '';
|
else s := '';
|
||||||
end;
|
end;
|
||||||
ShowInRow(FCurrRow, FBufferIndex, numbytes, Format('%d ($%.8x)', [dw, dw]),
|
ShowInRow(FCurrRow, FBufferIndex, numbytes, Format('%d ($%.8x)', [QWord(dw), QWord(dw)]),
|
||||||
Format('Extension property #%d (Full color extension): value %s', [i, s]));
|
Format('Extension property #%d (Full color extension): value %s', [i, s]));
|
||||||
numbytes := 4;
|
numbytes := 4;
|
||||||
Move(FBuffer[FBufferIndex], dw, numbytes);
|
Move(FBuffer[FBufferIndex], dw, numbytes);
|
||||||
dw := DWordLEToN(dw);
|
dw := DWordLEToN(dw);
|
||||||
ShowInRow(FCurrRow, FBufferIndex, numbytes, Format('%d ($%.8x)', [dw, dw]),
|
ShowInRow(FCurrRow, FBufferIndex, numbytes, Format('%d ($%.8x)', [QWord(dw), QWord(dw)]),
|
||||||
Format('Extension property #%d (Full color extension): Reserved', [i]));
|
Format('Extension property #%d (Full color extension): Reserved', [i]));
|
||||||
Move(FBuffer[FBufferIndex], dw, numbytes);
|
Move(FBuffer[FBufferIndex], dw, numbytes);
|
||||||
dw := DWordLEToN(dw);
|
dw := DWordLEToN(dw);
|
||||||
ShowInRow(FCurrRow, FBufferIndex, numbytes, Format('%d ($%.8x)', [dw, dw]),
|
ShowInRow(FCurrRow, FBufferIndex, numbytes, Format('%d ($%.8x)', [QWord(dw), QWord(dw)]),
|
||||||
Format('Extension property #%d (Full color extension): Reserved', [i]));
|
Format('Extension property #%d (Full color extension): Reserved', [i]));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user