Default to filename for name if name isn't set

This commit is contained in:
simon.kagstrom 2010-01-30 18:52:14 +00:00
parent 94c53ceb22
commit 6ff06c0d1f

View File

@ -28,6 +28,9 @@ GameInfo::GameInfo(const char *filename,
SDL_Surface *image)
{
this->filename = xstrdup(filename);
if (strcmp(name, " ") == 0)
this->name = xstrdup(filename);
else
this->name = xstrdup(name);
this->author = xstrdup(author);
this->screenshot = image;