View Issue Details

IDProjectCategoryView StatusLast Update
0034839FPCFVpublic2019-01-09 15:30
ReporterMarģersAssigned ToMarco van de Voort 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Platformamd64OSlinuxOS Version
Product Version3.0.4Product Build 
Target VersionFixed in Version3.3.1 
Summary0034839: unit drivers function formatStr expect param as array of PtrInt
DescriptionIn package FV function formatStr expects param to be array of PtrInt.
At some places param is given as Longint and that's lead to wrong text message formation.
Steps To ReproduceIn 64 bit version of Textmode IDE
Open any program. Edit-> Go to line number
type line number that is beyond actual line count in program. Press Enter. It will show error message "Value not in the range 1 to <some random number>".
Tagside_editor
Fixed in Revision40811
FPCOldBugId
FPCTarget
Attached Files
  • formatStrParam.patch (1,373 bytes)
    Index: packages/fv/src/editors.pas
    ===================================================================
    --- packages/fv/src/editors.pas	(revision 40810)
    +++ packages/fv/src/editors.pas	(working copy)
    @@ -1180,7 +1180,7 @@
     VAR
       Color : Byte;
       Frame : Char;
    -  L     : array[0..1] of Longint;
    +  L     : array[0..1] of PtrInt;
       S     : String[15];
       B     : TDrawBuffer;
     begin
    Index: packages/fv/src/statuses.pas
    ===================================================================
    --- packages/fv/src/statuses.pas	(revision 40810)
    +++ packages/fv/src/statuses.pas	(working copy)
    @@ -785,7 +785,7 @@
       B : TDrawBuffer;
       C : Word;
       FillSize : Word;
    -  PercentDone : LongInt;
    +  PercentDone : PtrInt;
       S : String[4];
     begin
       { fill entire view }
    Index: packages/fv/src/validate.pas
    ===================================================================
    --- packages/fv/src/validate.pas	(revision 40810)
    +++ packages/fv/src/validate.pas	(working copy)
    @@ -919,7 +919,7 @@
     {---------------------------------------------------------------------------}
     PROCEDURE TRangeValidator.Error;
     CONST PXErrMsg = 'Value not in the range';
    -VAR Params: Array[0..1] Of Longint;
    +VAR Params: Array[0..1] Of PtrInt;
     BEGIN
        Params[0] := Min;                                  { Transfer min value }
        Params[1] := Max;                                  { Transfer max value }
    
    formatStrParam.patch (1,373 bytes)

Activities

Marģers

2019-01-08 23:21

reporter  

formatStrParam.patch (1,373 bytes)
Index: packages/fv/src/editors.pas
===================================================================
--- packages/fv/src/editors.pas	(revision 40810)
+++ packages/fv/src/editors.pas	(working copy)
@@ -1180,7 +1180,7 @@
 VAR
   Color : Byte;
   Frame : Char;
-  L     : array[0..1] of Longint;
+  L     : array[0..1] of PtrInt;
   S     : String[15];
   B     : TDrawBuffer;
 begin
Index: packages/fv/src/statuses.pas
===================================================================
--- packages/fv/src/statuses.pas	(revision 40810)
+++ packages/fv/src/statuses.pas	(working copy)
@@ -785,7 +785,7 @@
   B : TDrawBuffer;
   C : Word;
   FillSize : Word;
-  PercentDone : LongInt;
+  PercentDone : PtrInt;
   S : String[4];
 begin
   { fill entire view }
Index: packages/fv/src/validate.pas
===================================================================
--- packages/fv/src/validate.pas	(revision 40810)
+++ packages/fv/src/validate.pas	(working copy)
@@ -919,7 +919,7 @@
 {---------------------------------------------------------------------------}
 PROCEDURE TRangeValidator.Error;
 CONST PXErrMsg = 'Value not in the range';
-VAR Params: Array[0..1] Of Longint;
+VAR Params: Array[0..1] Of PtrInt;
 BEGIN
    Params[0] := Min;                                  { Transfer min value }
    Params[1] := Max;                                  { Transfer max value }
formatStrParam.patch (1,373 bytes)

Marco van de Voort

2019-01-09 11:18

manager   ~0113284

Thanks, committed.

Issue History

Date Modified Username Field Change
2019-01-08 22:03 Marģers New Issue
2019-01-08 22:11 Marģers Tag Attached: ide_editor
2019-01-08 23:21 Marģers File Added: formatStrParam.patch
2019-01-09 11:18 Marco van de Voort Fixed in Revision => 40811
2019-01-09 11:18 Marco van de Voort Note Added: 0113284
2019-01-09 11:18 Marco van de Voort Status new => resolved
2019-01-09 11:18 Marco van de Voort Fixed in Version => 3.3.1
2019-01-09 11:18 Marco van de Voort Resolution open => fixed
2019-01-09 11:18 Marco van de Voort Assigned To => Marco van de Voort
2019-01-09 15:30 Marģers Status resolved => closed