Skip to content

Commit 994ec99

Browse files
committed
Fix an illegal code.
It is illegal to use the universal_access equality operator when one of the side is an attribute reference. Part of K602-004.
1 parent 3204e37 commit 994ec99

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/core/aws-translator.adb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
------------------------------------------------------------------------------
22
-- Ada Web Server --
33
-- --
4-
-- Copyright (C) 2000-2019, AdaCore --
4+
-- Copyright (C) 2000-2020, AdaCore --
55
-- --
66
-- This library is free software; you can redistribute it and/or modify --
77
-- it under terms of the GNU General Public License as published by the --
@@ -469,6 +469,8 @@ package body AWS.Translator is
469469
State : in out Encoding_State)
470470
is
471471
Encoded_Length : Integer;
472+
Base_Elem : constant access constant Base64_Encode_Array :=
473+
Base64 (MIME)'Access;
472474
begin
473475
case State.Current_State is
474476
when 1 =>
@@ -489,7 +491,7 @@ package body AWS.Translator is
489491

490492
Encoded_Length := 4 * ((State.Count + 2) / 3);
491493

492-
if State.To_Char = Base64 (MIME)'Access then
494+
if State.To_Char = Base_Elem then
493495
for I in State.Last .. Encoded_Length loop
494496
Add ('=');
495497
end loop;

0 commit comments

Comments
 (0)