# HG changeset patch # User ib # Date 1396008297 0 # Node ID 64fabc358356bf27bc04558429bc9076c4a6a469 # Parent ea94ee043275b52245acfbbab84d5a5687e26fcc Check numphases. Don't allow it to be zero. diff -r ea94ee043275 -r 64fabc358356 gui/skin/skin.c --- a/gui/skin/skin.c Fri Mar 28 11:40:37 2014 +0000 +++ b/gui/skin/skin.c Fri Mar 28 12:04:57 2014 +0000 @@ -659,6 +659,11 @@ item->Bitmap.Image = NULL; if (strcmp(phfname, "NULL") != 0) { + if (num == 0) { + skin_error(MSGTR_GUI_MSG_SkinErrorNumphases); + return 1; + } + av_strlcpy(buf, path, sizeof(buf)); av_strlcat(buf, phfname, sizeof(buf)); @@ -794,6 +799,11 @@ item->Bitmap.Image = NULL; if (strcmp(phfname, "NULL") != 0) { + if (num == 0) { + skin_error(MSGTR_GUI_MSG_SkinErrorNumphases); + return 1; + } + av_strlcpy(buf, path, sizeof(buf)); av_strlcat(buf, phfname, sizeof(buf)); diff -r ea94ee043275 -r 64fabc358356 help/help_mp-de.h --- a/help/help_mp-de.h Fri Mar 28 11:40:37 2014 +0000 +++ b/help/help_mp-de.h Fri Mar 28 12:04:57 2014 +0000 @@ -921,6 +921,7 @@ #define MSGTR_GUI_MSG_SkinErrorBitmap16Bit "Die Farbtiefe von %s beträgt 16 bpp oder weniger, was nicht unterstützt wird.\n" #define MSGTR_GUI_MSG_SkinErrorItem "Dieses Element wird in '%s' nicht unterstützt.\n" #define MSGTR_GUI_MSG_SkinErrorMessage "Fehler in der Skin-Konfigurationsdatei in Zeile %d: %s" +#define MSGTR_GUI_MSG_SkinErrorNumphases "Die Anzahl der Phasen darf nicht null sein.\n" #define MSGTR_GUI_MSG_SkinErrorSection "Für '%s' wurde kein Abschnitt angegeben.\n" #define MSGTR_GUI_MSG_SkinErrorWindow "Für '%s' wurde kein Fenster angegeben.\n" #define MSGTR_GUI_MSG_SkinFileNotFound "Skin-Datei %s nicht gefunden.\n" diff -r ea94ee043275 -r 64fabc358356 help/help_mp-en.h --- a/help/help_mp-en.h Fri Mar 28 11:40:37 2014 +0000 +++ b/help/help_mp-en.h Fri Mar 28 12:04:57 2014 +0000 @@ -712,6 +712,7 @@ #define MSGTR_GUI_MSG_SkinErrorBitmap16Bit "Color depth of bitmap %s is 16 bits or less which is not supported.\n" #define MSGTR_GUI_MSG_SkinErrorItem "This item is not supported by '%s'.\n" #define MSGTR_GUI_MSG_SkinErrorMessage "Error in skin config file at line %d: %s" +#define MSGTR_GUI_MSG_SkinErrorNumphases "The number of phases must not be zero.\n" #define MSGTR_GUI_MSG_SkinErrorSection "No section specified for '%s'.\n" #define MSGTR_GUI_MSG_SkinErrorWindow "No window specified for '%s'.\n" #define MSGTR_GUI_MSG_SkinFileNotFound "Skin file %s not found.\n"