mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-03 14:23:40 +01:00
fix: Don't generate dummy sale entries if no sales are present. (#1471)
- Fixes a bug that's apparently been around for a while that submitted invalid data to Universalis.
This commit is contained in:
parent
a7f134b14e
commit
392d9ac884
1 changed files with 10 additions and 3 deletions
|
|
@ -42,10 +42,17 @@ public class MarketBoardHistory
|
|||
using var stream = new UnmanagedMemoryStream((byte*)dataPtr.ToPointer(), 1544);
|
||||
using var reader = new BinaryReader(stream);
|
||||
|
||||
var output = new MarketBoardHistory();
|
||||
var output = new MarketBoardHistory
|
||||
{
|
||||
CatalogId = reader.ReadUInt32(),
|
||||
CatalogId2 = reader.ReadUInt32(),
|
||||
};
|
||||
|
||||
output.CatalogId = reader.ReadUInt32();
|
||||
output.CatalogId2 = reader.ReadUInt32();
|
||||
if (output.CatalogId2 == 0)
|
||||
{
|
||||
// No items found in the resulting packet - just return the empty history.
|
||||
return output;
|
||||
}
|
||||
|
||||
for (var i = 0; i < 20; i++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue