Skip to content

Commit

Permalink
fix debug build
Browse files Browse the repository at this point in the history
  • Loading branch information
pionere committed Nov 26, 2023
1 parent 3cf9e05 commit fa44284
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions Source/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ void ValidateData()
cookie_t cookie = 123456;
const BYTE dynData[16] = "lwkejfwip";
const BYTE (&addr)[16] = dynData;
SNetGameData gameData;
const BYTE (&addrs)[16] = dynData;
SNetGameData gameData;
pkt = pktfty.make_out_packet<net::PT_MESSAGE>(plr_self, net::PLR_BROADCAST, dynData, sizeof(dynData));
if (!pkt->validate()) {
app_fatal("PT_MESSAGE is invalid");
Expand All @@ -138,12 +139,12 @@ void ValidateData()
app_fatal("PT_JOIN_REQUEST is invalid");
}
delete pkt;
pkt = pktfty.make_out_packet<net::PT_JOIN_ACCEPT>(net::PLR_MASTER, net::PLR_BROADCAST, cookie, plr_other, (const BYTE*)&gameData, plr_mask);
pkt = pktfty.make_out_packet<net::PT_JOIN_ACCEPT>(net::PLR_MASTER, net::PLR_BROADCAST, cookie, plr_other, (const BYTE*)&gameData, plr_mask, turn, addrs, sizeof(addrs));
if (!pkt->validate()) {
app_fatal("PT_JOIN_ACCEPT is invalid");
}
delete pkt;
pkt = pktfty.make_out_packet<net::PT_CONNECT>(plr_self, net::PLR_BROADCAST, net::PLR_MASTER, addr, sizeof(addr));
pkt = pktfty.make_out_packet<net::PT_CONNECT>(plr_self, net::PLR_BROADCAST, net::PLR_MASTER, turn, addr, sizeof(addr));
if (!pkt->validate()) {
app_fatal("PT_CONNECT is invalid");
}
Expand Down
4 changes: 2 additions & 2 deletions Source/scrollrt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ static void DrawObject(int oi, int x, int y, int ox, int oy)

nCel = os->_oAnimFrame;
#if DEBUG_MODE
int frames = pCelBuff->ciFrameCnt;
int frames = ((CelImageBuf*)pCelBuff)->ciFrameCnt;
if (nCel < 1 || frames > 50 || nCel > frames) {
dev_fatal("Draw Object: frame %d of %d, type %d", nCel, frames, os->_otype);
}
Expand Down Expand Up @@ -1027,7 +1027,7 @@ static void DrawItem(int ii, int sx, int sy)
}
nCel = is->_iAnimFrame;
#if DEBUG_MODE
int frames = pCelBuff->ciFrameCnt;
int frames = ((CelImageBuf*)pCelBuff)->ciFrameCnt;
if (nCel < 1 || frames > 50 || nCel > frames) {
dev_fatal("Draw Item \"%s\": frame %d of %d, type %d", is->_iName, nCel, frames, is->_itype);
}
Expand Down

0 comments on commit fa44284

Please sign in to comment.