BenGrn / EldenRingSaveCopier

MIT License
472 stars 46 forks source link

Character level is parsed as a byte #29

Open pubnoconst opened 1 year ago

pubnoconst commented 1 year ago

https://github.com/BenGrn/EldenRingSaveCopier/blob/0fe9d7f643c4b8e8c5def64489d13154f9711f00/EldenRingSaveCopy/Saves/Model/SaveGame.cs#L83 Here, we are indexing a byte out of a byte[] to parse characters level. AFAIK the character level can go upto 713, which surpasses byte's max value 255. Is this a possible parse error?

Unfortunately I cannot use the CE to find out whether parse error occurs if I have a max level character on my system and so I am not able to create bug out of this.

BenGrn commented 1 year ago

This is possible. I'm not sure if it will use two bytes with a MSB or LSB order and which way in the array it will go. Once we have a character at 256 we can test and see. Unfortunately I don't have time to change a save and test to see if we can force level over 255.