Skip to content

Commit

Permalink
Stream: Cache: Accept early end
Browse files Browse the repository at this point in the history
  • Loading branch information
Werni2A committed Jun 20, 2024
1 parent 95287ea commit 35a6f4a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
28 changes: 14 additions & 14 deletions repos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2148,7 +2148,7 @@ repositories:
- errors: 0
options: null
path: ./OrCAD/SmartGardenShield/LIBRARY1.OLB
- errors: 1
- errors: 0
options: null
path: ./OrCAD/DESIGN1.DSN
- errors: 0
Expand All @@ -2160,7 +2160,7 @@ repositories:
- errors: 0
options: null
path: ./OrCAD/Schematic/CC1310LAUNCHPAD.DSN
- errors: 1
- errors: 0
options: null
path: ./OrCAD/SmartGardenShield/DESIGN1.DSN
- errors: 0
Expand Down Expand Up @@ -2387,7 +2387,7 @@ repositories:
- errors: 0
options: null
path: ./orcadData/RINGCOUNTER_EXAM.DSN
- errors: 1
- errors: 0
options: null
path: ./orcadData/ATMEGA.DSN
- errors: 0
Expand Down Expand Up @@ -2468,13 +2468,13 @@ repositories:
- errors: 0
options: null
path: ./orcadData/RINGCOUNTER_EXAM_0.DBK
- errors: 1
- errors: 0
options: null
path: ./orcadData/SPICE_RESONANCECIRCUIT_0.DBK
- errors: 0
options: null
path: ./orcadData/SPICE_MULTIVIBRATOR_0.DBK
- errors: 1
- errors: 0
options: null
path: ./orcadData/stm32_f103c8_interrupt/STM32F103C8_INTERRUPT_0.DBK
- errors: 0
Expand All @@ -2492,7 +2492,7 @@ repositories:
- errors: 0
options: null
path: ./orcadData/wheatstonebridge/WHEATSTONEBRIDGE_0.DBK
- errors: 1
- errors: 0
options: null
path: ./orcadData/LED/LED_0.DBK
- errors: 0
Expand All @@ -2510,7 +2510,7 @@ repositories:
- errors: 0
options: null
path: ./orcadData/start1/LED_0.DBK
- errors: 1
- errors: 0
options: null
path: ./orcadData/start1/BRIDGEDIODE_0.DBK
- errors: 0
Expand Down Expand Up @@ -4548,16 +4548,16 @@ repositories:
- errors: 0
options: null
path: ./ATmegaStart/ATMEGASTART.DSN
- errors: 1
- errors: 0
options: null
path: ./555timer/DESIGN3.DSN
- errors: 1
options: null
path: ./555timer/555TIMER.DSN
- errors: 1
- errors: 0
options: null
path: ./555timer/DESIGN1.DSN
- errors: 1
- errors: 0
options: null
path: ./555timer/DESIGN2.DSN
- errors: 0
Expand All @@ -4569,7 +4569,7 @@ repositories:
- errors: 0
options: null
path: ./LED5/LED5.DSN
- errors: 1
- errors: 0
options: null
path: ./OP_AMP/OP_AMP.DSN
- errors: 0
Expand All @@ -4590,7 +4590,7 @@ repositories:
- errors: 0
options: null
path: ./Digital_Convertor/DIGITAL_CONVERTOR.DSN
- errors: 1
- errors: 0
options: null
path: ./practice/PRACTICE.DSN
- errors: 0
Expand All @@ -4602,7 +4602,7 @@ repositories:
- errors: 0
options: null
path: ./ATmegaStart/ATMEGASTART_0.DBK
- errors: 1
- errors: 0
options: null
path: ./555timer/555TIMER_0.DBK
- errors: 0
Expand Down Expand Up @@ -4635,7 +4635,7 @@ repositories:
- errors: 0
options: null
path: ./Digital_Convertor/DIGITAL_CONVERTOR.DBK
- errors: 1
- errors: 0
options: null
path: ./practice/PRACTICE_0.DBK
- errors: 0
Expand Down
6 changes: 6 additions & 0 deletions src/Streams/StreamCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ void StreamCache::read(FileFormatVersion /* aVersion */)
break;
}

if(parser.tryRead([&](){ ds.readBytes(1U); ds.sanitizeEoF(); }))
{
ds.printUnknownData(1U, "Unknown Byte before end");
break;
}

const bool hasMysterious2Byte = !parser.tryRead([&](){ ds.readStringLenZeroTerm(); });

if(hasMysterious2Byte)
Expand Down

0 comments on commit 35a6f4a

Please sign in to comment.