[gnome-bluetooth] wizard: Fix PIN generation for iCade
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] wizard: Fix PIN generation for iCade
- Date: Mon, 25 Nov 2013 11:33:42 +0000 (UTC)
commit 62836d57f66c0d49cf2814229574a0f567bcd2f2
Author: Bastien Nocera <hadess hadess net>
Date: Wed Nov 20 10:43:47 2013 +0100
wizard: Fix PIN generation for iCade
g_random_int_range() returns an int in the range [begin..end-1].
We want 4 to the an option, so we need to call it with 5.
wizard/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/wizard/main.c b/wizard/main.c
index 2c8f30a..3c9ed2d 100644
--- a/wizard/main.c
+++ b/wizard/main.c
@@ -172,7 +172,7 @@ get_icade_pincode (char **pin_display_str)
int r;
char *c;
- r = g_random_int_range (1, 4);
+ r = g_random_int_range (1, 5);
c = g_strdup_printf ("%d", r);
g_string_append (pin, c);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]