aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2019-10-29 00:08:19 +0000
committerEugene Sandulenko2019-10-29 00:08:19 +0000
commitf93bbfd7cae334d242760f6d3681b4ae318fa981 (patch)
tree45e1fa0a541b05aa769016445add65467180dd7d /engines
parent98f8e05f4edc297cb106853ded1e8b01632dc966 (diff)
downloadscummvm-rg350-f93bbfd7cae334d242760f6d3681b4ae318fa981.tar.gz
scummvm-rg350-f93bbfd7cae334d242760f6d3681b4ae318fa981.tar.bz2
scummvm-rg350-f93bbfd7cae334d242760f6d3681b4ae318fa981.zip
SCUMM HE: MBC: Fixed empty packet check
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/he/moonbase/net_main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/scumm/he/moonbase/net_main.cpp b/engines/scumm/he/moonbase/net_main.cpp
index 90918420f6..10a6544e9a 100644
--- a/engines/scumm/he/moonbase/net_main.cpp
+++ b/engines/scumm/he/moonbase/net_main.cpp
@@ -338,8 +338,8 @@ int Net::remoteSendData(int typeOfSend, int sendTypeParam, int type, byte *data,
// I'd rather parse it
Common::String res = Common::String::format(
"{\"sessionid\":%d, \"userid\":%d, \"to\":%d, \"toparam\": %d, "
- "\"type\":%d, \"timestamp\": %d, \"data\": [", _sessionid, _myUserId,
- typeOfSend, sendTypeParam, type, g_system->getMillis());
+ "\"type\":%d, \"timestamp\": %d, \"size\": %d, \"data\": [", _sessionid, _myUserId,
+ typeOfSend, sendTypeParam, type, g_system->getMillis(), len);
for (int i = 0; i < len - 1; i++)
res += Common::String::format("%d, ", data[i]);
@@ -471,7 +471,7 @@ bool Net::remoteReceiveData() {
g_system->delayMillis(5);
}
- if (!_packetdata)
+ if (!_packetdata || _packetdata->child("size")->asIntegerNumber() == 0)
return false;
uint from = _packetdata->child("from")->asIntegerNumber();