Skip to content
GitLab
About GitLab
GitLab: the DevOps platform
Explore GitLab
Install GitLab
How GitLab compares
Get started
GitLab docs
GitLab Learn
Pricing
Talk to an expert
/
Help
What's new
2
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Projects
Groups
Snippets
Register
Sign in
Toggle navigation
Menu
Open sidebar
FPC
FPC
FPC Source
Commits
e736011c
Commit
e736011c
authored
Oct 04, 2022
by
Michael Van Canneyt
Browse files
* Fix from Bart for issue
#39938
parent
f8848dd1
Pipeline
#657744200
passed with stages
in 18 minutes and 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
packages/fcl-base/src/maskutils.pp
View file @
e736011c
...
...
@@ -780,31 +780,34 @@ function TMaskUtils.ApplyMaskToText(AValue: String): String;
end
//FMaskSave = True
else
begin
//FMaskSave = False
if
FTrimType
=
metTrimRight
then
if
Value
<>
''
then
begin
//fill text from left to rigth, skipping MaskLiterals
j
:=
1
;
for
i
:=
1
to
FMaskLength
do
if
FTrimType
=
metTrimRight
then
begin
if
not
IsLiteral
(
FMask
[
i
])
then
//fill text from left to rigth, skipping MaskLiterals
j
:=
1
;
for
i
:=
1
to
FMaskLength
do
begin
if
(
AValue
[
j
]
=
#
32
)
then
S
[
i
]:=
FSpaceChar
else
S
[
i
]
:=
AValue
[
j
];
Inc
(
j
);
if
j
>
Length
(
AValue
)
then
Break
;
if
not
IsLiteral
(
FMask
[
i
])
then
begin
if
(
AValue
[
j
]
=
#
32
)
then
S
[
i
]:=
FSpaceChar
else
S
[
i
]
:=
AValue
[
j
];
Inc
(
j
);
if
j
>
Length
(
AValue
)
then
Break
;
end
;
end
;
end
;
end
else
begin
//fill text from right to left, skipping MaskLiterals
j
:=
Length
(
AValue
);
for
i
:=
FMaskLength
downto
1
do
end
else
begin
if
not
IsLiteral
(
FMask
[
i
])
then
//fill text from right to left, skipping MaskLiterals
j
:=
Length
(
AValue
);
for
i
:=
FMaskLength
downto
1
do
begin
if
(
AValue
[
j
]
=
#
32
)
then
S
[
i
]
:=
FSpaceChar
else
S
[
i
]
:=
AValue
[
j
];
Dec
(
j
);
if
j
<
1
then
Break
;
if
not
IsLiteral
(
FMask
[
i
])
then
begin
if
(
AValue
[
j
]
=
#
32
)
then
S
[
i
]
:=
FSpaceChar
else
S
[
i
]
:=
AValue
[
j
];
Dec
(
j
);
if
j
<
1
then
Break
;
end
;
end
;
end
;
end
;
...
...
Bart B
🐞
@flyingsheep
mentioned in issue
#40020 (closed)
·
Dec 03, 2022
mentioned in issue
#40020 (closed)
mentioned in issue #40020
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment