From 67398e4c682bf65b0330f16d1cb1a553ae8accc6 Mon Sep 17 00:00:00 2001 From: Ryan Stecker Date: Sun, 4 Nov 2012 13:45:22 -0600 Subject: [PATCH] Expose the first child of an appinfo section. Bump up assembly version to 1.2.0. --- SteamKit2/SteamKit2/Properties/AssemblyInfo.cs | 2 +- SteamKit2/SteamKit2/Steam3/Handlers/SteamApps/Callbacks.cs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/SteamKit2/SteamKit2/Properties/AssemblyInfo.cs b/SteamKit2/SteamKit2/Properties/AssemblyInfo.cs index 57ba9bd0d..0f46a5f9e 100644 --- a/SteamKit2/SteamKit2/Properties/AssemblyInfo.cs +++ b/SteamKit2/SteamKit2/Properties/AssemblyInfo.cs @@ -38,4 +38,4 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion( "1.1.0.*" )] +[assembly: AssemblyVersion( "1.2.0.*" )] diff --git a/SteamKit2/SteamKit2/Steam3/Handlers/SteamApps/Callbacks.cs b/SteamKit2/SteamKit2/Steam3/Handlers/SteamApps/Callbacks.cs index d3310b7d5..f7f706297 100644 --- a/SteamKit2/SteamKit2/Steam3/Handlers/SteamApps/Callbacks.cs +++ b/SteamKit2/SteamKit2/Steam3/Handlers/SteamApps/Callbacks.cs @@ -233,10 +233,14 @@ internal App( CMsgClientAppInfoResponse.App app, AppInfoStatus status ) foreach ( var section in app.sections ) { KeyValue kv = new KeyValue(); + using ( MemoryStream ms = new MemoryStream( section.section_kv ) ) kv.ReadAsBinary( ms ); - Sections.Add( ( EAppInfoSection )section.section_id, kv ); + if ( kv.Children != null ) + { + Sections.Add( ( EAppInfoSection )section.section_id, kv.Children.FirstOrDefault() ); + } } }