diff --git a/src/main.c b/src/main.c index 562ba14..7f80a19 100644 --- a/src/main.c +++ b/src/main.c @@ -45,7 +45,7 @@ static void print_usage(char** argv) { //LOG("\t-h n - Set height to (n)"); LOG("\t-j n, --joystick n - Use joystick (n)"); LOG("\t-J s, --joystick s - Use joystick whose name contains (s)"); - LOG("\t--help - Display this message and exit."); + LOG("\t-h --help - Display this message and exit."); LOG("\t-v - Print the version and exit"); } diff --git a/src/ship.c b/src/ship.c index 1bb46b6..77a58f6 100644 --- a/src/ship.c +++ b/src/ship.c @@ -18,7 +18,7 @@ #define SHIP_GFX "../gfx/ship/" static Ship* ship_stack = NULL; -static int ships; +static int ships = 0; // Get a ship based on it's name. Ship* get_ship(const char* name) { @@ -124,7 +124,8 @@ int ships_load(void) { if(xmlTextReaderNodeType(reader)==XML_NODE_START && strcmp((char*)xmlTextReaderConstName(reader), XML_SHIP)==0) { - node = xmlTextReaderCurrentNode(reader); // Node to process. + node = xmlTextReaderCurrentNode(reader); // Node to processr + if(node == NULL) break; // No node. if(ship_stack == NULL) { ship_stack = tmp = ship_parse(node); ships = 1;