summaryrefslogtreecommitdiff
path: root/src/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'src/dialogs')
-rw-r--r--src/dialogs/about.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dialogs/about.c b/src/dialogs/about.c
index 4f34a2c..e182f8f 100644
--- a/src/dialogs/about.c
+++ b/src/dialogs/about.c
@@ -59,6 +59,7 @@ GtkWidget *create_about_dialog(GtkWindow *parent)
GtkWidget *image; /* Image chargée */
unsigned int revision; /* Numéro de révision */
unsigned int i; /* Boucle de parcours */
+ unsigned int max; /* Nbre. de boucles à effectuer*/
unsigned int level; /* Unité la plus importante */
char buffer[16]; /* Nom d'image à forger */
GtkWidget *label; /* Etiquette inférieure */
@@ -98,11 +99,11 @@ GtkWidget *create_about_dialog(GtkWindow *parent)
gtk_widget_set_size_request(image, 14, 18);
revision = REVISION;
+ max = log(revision) / log(10);
- for (i = 0; revision > 0; i++)
+ for (i = 0; i <= max; i++)
{
- level = log(revision) / log(10);
- level = pow(10, level);
+ level = pow(10, max - i);
snprintf(buffer, 16, "revision_%u.png", revision / level);