Skip to content
This repository has been archived by the owner on Sep 22, 2021. It is now read-only.

Does not parsing all players properly #150

Open
gdhsnlvr opened this issue Sep 26, 2018 · 4 comments
Open

Does not parsing all players properly #150

gdhsnlvr opened this issue Sep 26, 2018 · 4 comments

Comments

@gdhsnlvr
Copy link

Lib does not parsing some players and event related to this players have null in player field.
examples:
https://www.hltv.org/matches/2320066/sk-vs-astralis-iem-katowice-2018 map 2 (de_mirage).
https://www.hltv.org/matches/2320074/renegades-vs-cloud9-iem-katowice-2018 map 3 (de_train).
parser.PlayingParticipants have 9 players, PlayerKilledEventArgs have null in fields Killer/Victim/Assister when event related to missing player.
(version is last stable realise 1.2.0)

@InspektorLulz
Copy link

Hi I found that the library doesnt parse all entries in a Stringtable Packet. Just delete line 83 and 84 in Namespace: DemoInfo.DP.Handler Class: CreateStringTableUserInfoHandler .

if (userdata.Length == 0)
break;

That at least solved my issue with players not beeing parsed.

@master117
Copy link
Contributor

master117 commented Dec 3, 2018

Deleting that will lead to unwated behavior, change it to:

if (userdata.Length == 0)
  continue;

instead.

Edit:

I just checked, it is already

if (userdata.Length == 0)
  continue;

where did you see:

if (userdata.Length == 0)
  break;

?

@master117
Copy link
Contributor

master117 commented Dec 3, 2018

I just removed

if (userdata.Length == 0)
  continue;

as you suggested.
This leads to exceptions in Helper.cs:

		public static long ReadInt64SwapEndian(this BinaryReader reader)
		{
			return BitConverter.ToInt64(reader.ReadBytes(8).Reverse().ToArray(), 0);
		}

steaming from:

internal PlayerInfo(BinaryReader reader)

@InspektorLulz
Copy link

InspektorLulz commented Dec 3, 2018

In the stable release 1.2.0 from November 2015 (you can download the zip) there is a break instead of continue.
You are right, it should be continue. I didn't get the exception though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants