[gnome-shell] bluetooth: Parse pins starting with 0 correctly



commit 8bd7003ea7ae9a04ef2fae9f014093bb8da84092
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sat Nov 2 17:55:48 2013 -0400

    bluetooth: Parse pins starting with 0 correctly
    
    If we have a numeric PIN that starts with 0, it will be treated
    as an octal number rather than a number that just starts with 0.

 js/ui/status/bluetooth.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/status/bluetooth.js b/js/ui/status/bluetooth.js
index ce0aa02..4b74b23 100644
--- a/js/ui/status/bluetooth.js
+++ b/js/ui/status/bluetooth.js
@@ -228,7 +228,7 @@ const PinNotification = new Lang.Class({
 
     _ok: function() {
         if (this._numeric) {
-            let num = parseInt(this._entry.text);
+            let num = parseInt(this._entry.text, 10);
             if (isNaN(num)) {
                 // user reply was empty, or was invalid
                 // cancel the operation


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]