View Issue Details

IDProjectCategoryView StatusLast Update
0032491PatchesOtherpublic2017-10-14 21:14
Reporterdelfion Assigned ToBart Broersma  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.9 (SVN) 
Target Version1.8Fixed in Version1.9 (SVN) 
Summary0032491: TMask uppercase bug
Descriptionprogram project1;

{$mode objfpc}{$H+}

uses
masks;

var mask:TMask;
begin
  mask:=TMask.Create('[a]',false);
  writeln(mask.Matches('a'));
  mask.free;
end.
   
TagsNo tags attached.
Fixed in Revisionr56029
LazTarget1.8
Widgetset
Attached Files

Activities

delfion

2017-09-29 19:07

reporter  

mask.diff (754 bytes)   
Index: components/lazutils/masks.pas
===================================================================
--- components/lazutils/masks.pas	(revision 55798)
+++ components/lazutils/masks.pas	(working copy)
@@ -240,7 +240,7 @@
             else
             begin
               //writeln('MaskUtf8: Set:  ' + Last + '-' + UpCase(CP[1]));
-              for C := Last to UpCase(CP[1]) do
+              for C := Last to LowerCase(CP[1]) do
                 Include(CharSet, C)
             end;
             Inc(I);
@@ -255,7 +255,7 @@
           if fCaseSensitive then
             Last := CP[1]
           else
-            Last := UpCase(CP[1]);
+            Last := LowerCase(CP[1]);
           Include(CharSet, Last);
           Inc(I);
         end;
mask.diff (754 bytes)   

delfion

2017-09-29 19:09

reporter   ~0103123

Output should be true but it is false. "Filename" is converted to lowercase and compared to uppercase char of mask.

Bart Broersma

2017-10-11 17:42

developer   ~0103358

Applied.
Thanks for the patch.
Please test and close if OK.

Issue History

Date Modified Username Field Change
2017-09-29 19:07 delfion New Issue
2017-09-29 19:07 delfion File Added: mask.diff
2017-09-29 19:09 delfion Note Added: 0103123
2017-09-29 22:29 Bart Broersma Assigned To => Bart Broersma
2017-09-29 22:29 Bart Broersma Status new => assigned
2017-10-11 17:42 Bart Broersma Fixed in Revision => r56029
2017-10-11 17:42 Bart Broersma LazTarget => 1.8
2017-10-11 17:42 Bart Broersma Note Added: 0103358
2017-10-11 17:42 Bart Broersma Status assigned => resolved
2017-10-11 17:42 Bart Broersma Fixed in Version => 1.9 (SVN)
2017-10-11 17:42 Bart Broersma Resolution open => fixed
2017-10-11 17:42 Bart Broersma Target Version => 1.8
2017-10-14 21:14 delfion Status resolved => closed