Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
What's new
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Menu
Open sidebar
FPC
FPC
FPC Source
Commits
042eb7e8
Commit
042eb7e8
authored
Jan 23, 2022
by
Michael Van Canneyt
Browse files
* Small safety precaution
parent
e27ea76b
Pipeline
#454282773
passed with stages
in 18 minutes and 33 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rtl/objpas/classes/streams.inc
View file @
042eb7e8
...
...
@@ -414,7 +414,7 @@ procedure TStream.ReadBuffer(var Buffer; Count: NativeInt);
if
r
>
High
(
Longint
)
then
r
:=
High
(
Longint
);
r
:=
Read
(
PByte
(@
Buffer
)[
t
],
r
);
inc
(
t
,
r
);
until
(
t
=
Count
)
or
(
r
<=
0
);
until
(
t
>
=
Count
)
or
(
r
<=
0
);
if
(
t
<
Count
)
then
raise
EReadError
.
Create
(
SReadError
);
end
;
...
...
@@ -591,7 +591,7 @@ procedure TStream.WriteBuffer(const Buffer; Count: NativeInt);
if
w
>
High
(
Longint
)
then
w
:=
High
(
Longint
);
w
:=
Write
(
PByte
(@
Buffer
)[
t
],
w
);
inc
(
t
,
w
);
until
(
t
=
count
)
or
(
w
<=
0
);
until
(
t
>
=
count
)
or
(
w
<=
0
);
if
(
t
<
Count
)
then
raise
EWriteError
.
Create
(
SWriteError
);
end
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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