Natools

Check-in [baef3cc8be]
Login
Overview
Comment:smaz_implementations-base_256: fix exception on 1-byte non-VLV blocks
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: baef3cc8be9e483df7789ddb85178e7bb7bdf41a
User & Date: nat on 2017-02-21 21:11:33
Other Links: manifest | tags
Context
2017-02-22
22:45
smaz-tests: add a test of multi-block verbatim sequence check-in: 3b0fbf12a9 user: nat tags: trunk
2017-02-21
21:11
smaz_implementations-base_256: fix exception on 1-byte non-VLV blocks check-in: baef3cc8be user: nat tags: trunk
2017-02-20
20:16
smaz_implementations-base_256: fix off-by-one error in Verbatim_Size check-in: 1183e8ca09 user: nat tags: trunk
Changes

Modified src/natools-smaz_implementations-base_256.adb from [2ae576e7b5] to [42a4c31c37].

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
         Code := Input_Byte;
         Verbatim_Length := 0;
      else
         Code := 0;

         if not Variable_Length_Verbatim then
            Verbatim_Length
              := Positive (Ada.Streams.Stream_Element'Last - Input_Byte) + 1;
         elsif Input_Byte < Ada.Streams.Stream_Element'Last then
            Verbatim_Length
              := Positive (Ada.Streams.Stream_Element'Last - Input_Byte);
         else
            Offset := Offset + 1;
            Verbatim_Length
              := Positive (Input (Offset))







|







34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
         Code := Input_Byte;
         Verbatim_Length := 0;
      else
         Code := 0;

         if not Variable_Length_Verbatim then
            Verbatim_Length
              := Natural (Ada.Streams.Stream_Element'Last - Input_Byte) + 1;
         elsif Input_Byte < Ada.Streams.Stream_Element'Last then
            Verbatim_Length
              := Positive (Ada.Streams.Stream_Element'Last - Input_Byte);
         else
            Offset := Offset + 1;
            Verbatim_Length
              := Positive (Input (Offset))