From 44478b28bc5c4a8f9b064d0ae6936662e9ad11a9 Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Wed, 19 May 2010 23:42:11 +0000 Subject: Fixed a bug: make sure all figures of revision are displayed. git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@161 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a --- ChangeLog | 5 +++++ src/dialogs/about.c | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 08bda34..7677391 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 10-05-20 Cyrille Bagard + * src/dialogs/about.c: + Fix a bug: make sure all figures of revision are displayed. + +10-05-20 Cyrille Bagard + * src/arch/dalvik/instruction.c: * src/arch/dalvik/instruction.h: Add support for a few more Dalvik instructions. 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); -- cgit v0.11.2-87-g4458