From 4f93fba0248e9a52fdaf5887d09d1e7ab6ca1302 Mon Sep 17 00:00:00 2001 From: Allanis Date: Wed, 3 Apr 2013 19:08:42 +0100 Subject: [PATCH] [Add] Finally, fixed two horrible ugly ass bugs. --- dat/ship.xml | 2 +- src/player.c | 2 +- src/toolkit.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dat/ship.xml b/dat/ship.xml index e1f404c..c73ead0 100644 --- a/dat/ship.xml +++ b/dat/ship.xml @@ -100,7 +100,7 @@ lancer - minimal + minimal engine 2 700000 diff --git a/src/player.c b/src/player.c index d80fa4e..60bedfd 100644 --- a/src/player.c +++ b/src/player.c @@ -242,7 +242,7 @@ void player_newShip(Ship* ship, double px, double py, "Please name your shiny new %s", ship->name); player_newShipMake(ship_name); - free(ship->name); + free(ship_name); } // Change the players ship. diff --git a/src/toolkit.c b/src/toolkit.c index 88f67c2..2bef1b4 100644 --- a/src/toolkit.c +++ b/src/toolkit.c @@ -247,6 +247,7 @@ void window_addList(const unsigned int wid, const int x, const int y, wgt->dat.lst.selected = defitem; // -1 would be none. wgt->dat.lst.pos = 0; wgt->dat.lst.fptr = call; + wgt->w = (double) w; wgt->h = (double) h - ((h % (gl_defFont.h+2)) + 2); if(x < 0) wgt->x = wdw->w - wgt->w + x;