diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2010-05-19 23:42:11 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2010-05-19 23:42:11 (GMT) |
commit | 44478b28bc5c4a8f9b064d0ae6936662e9ad11a9 (patch) | |
tree | 00d965f1614e232da3e09699e43e26ebc297c010 | |
parent | 6511f2fe4551c2ea231115d6c659c99e15b3a23b (diff) |
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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/dialogs/about.c | 7 |
2 files changed, 9 insertions, 3 deletions
@@ -1,5 +1,10 @@ 10-05-20 Cyrille Bagard <nocbos@gmail.com> + * src/dialogs/about.c: + Fix a bug: make sure all figures of revision are displayed. + +10-05-20 Cyrille Bagard <nocbos@gmail.com> + * 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); |