summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-15 14:03:04 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-15 14:03:04 +0000
commit806dd2ec3cdb39c8ae528b65f93984ed66496709 (patch)
tree6f654774ee4e0e6275f5904093dea0147ead9edf /src/net
parentaa42c03c8a6b10d4fac03143f06811d94a253270 (diff)
downloadmana-806dd2ec3cdb39c8ae528b65f93984ed66496709.tar.gz
mana-806dd2ec3cdb39c8ae528b65f93984ed66496709.tar.bz2
mana-806dd2ec3cdb39c8ae528b65f93984ed66496709.tar.xz
mana-806dd2ec3cdb39c8ae528b65f93984ed66496709.zip
Fixing crash on death. Death handling could still be improved though.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/protocol.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/net/protocol.cpp b/src/net/protocol.cpp
index b9a9c938..6a519a0f 100644
--- a/src/net/protocol.cpp
+++ b/src/net/protocol.cpp
@@ -114,9 +114,8 @@ unsigned short get_x(const char *data) {
unsigned short get_y(const char *data) {
short temp;
- if(!data)error("Corrupted data");
+ if (!data) throw "Corrupted data";
temp = MAKEWORD(data[2] & 0x00f0, data[1] & 0x003f);
- if(!temp)error("Corrupted data");
temp >>= 4;
return temp;
}