Skip to content

Commit 3aa30bc

Browse files
committed
Version 1.0
Fix problems reading compressed control structures
1 parent b2606fc commit 3aa30bc

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

MainWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
</ListView.View>
171171
</ListView>
172172
</Grid>
173-
<ListView Grid.Row="1" Name="listAttachments" Margin="0,0,0,0" ItemsSource="{Binding Path=CurrentMessage.Attachments}"
173+
<ListView Grid.Row="1" Name="listAttachments" Margin="0,0,0,0" ItemsSource="{Binding Path=CurrentMessage.Attachments}" MaxHeight="200"
174174
SelectionChanged="listAttachments_SelectionChanged" FontSize="12" Visibility="{Binding IsAttachmentPresent, Converter={StaticResource VisibleIfTrue}}">
175175
<ListView.View>
176176
<GridView>

NDB.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -554,9 +554,9 @@ private void ReadSubNodeBtreeUnicode(FileStream fs, UInt64 subDataBid, TreeInter
554554
var rb = LookupDataBlock(subDataBid);
555555
if (rb == null)
556556
throw new Exception("SubNode data block does not exist");
557-
byte[] buffer = new byte[rb.Length];
558-
fs.Seek((long)rb.Offset, SeekOrigin.Begin);
559-
fs.Read(buffer, 0, rb.Length);
557+
558+
int read;
559+
byte[] buffer = ReadAndDecompress(fs, rb, out read);
560560
var sl = Map.MapType<SLBLOCKUnicode>(buffer);
561561

562562
if (sl.cLevel > 0)
@@ -590,9 +590,9 @@ private void ReadSubNodeBtreeANSI(FileStream fs, UInt64 subDataBid, TreeIntermed
590590
var rb = LookupDataBlock(subDataBid);
591591
if (rb == null)
592592
throw new Exception("SubNode data block does not exist");
593-
byte[] buffer = new byte[rb.Length];
594-
fs.Seek((long)rb.Offset, SeekOrigin.Begin);
595-
fs.Read(buffer, 0, rb.Length);
593+
594+
int read;
595+
byte[] buffer = ReadAndDecompress(fs, rb, out read);
596596
var sl = Map.MapType<SLBLOCKANSI>(buffer);
597597

598598
if (sl.cLevel > 0)

Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@
5151
// You can specify all the values or you can default the Build and Revision Numbers
5252
// by using the '*' as shown below:
5353
// [assembly: AssemblyVersion("1.0.*")]
54-
[assembly: AssemblyVersion("0.9.*")]
54+
[assembly: AssemblyVersion("1.0.*")]

0 commit comments

Comments
 (0)