summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/net/protocol.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/protocol.cpp b/src/net/protocol.cpp
index f357b103..de41467e 100644
--- a/src/net/protocol.cpp
+++ b/src/net/protocol.cpp
@@ -226,7 +226,7 @@ void action(char type, int id)
Being* attack(unsigned short x, unsigned short y, unsigned char direction)
{
- Being *target;
+ Being *target = NULL;
if (direction == SOUTH) {
target = findNode(x, y + 1);
@@ -234,7 +234,7 @@ Being* attack(unsigned short x, unsigned short y, unsigned char direction)
target = findNode(x - 1, y);
} else if(direction == NORTH) {
target = findNode(x, y - 1);
- } else if(direction==EAST) {
+ } else if(direction == EAST) {
target = findNode(x + 1, y);
}