Opened on 10/31/2014 at 12:05:31 AM

Closed on 11/04/2014 at 08:00:29 AM

#1517 closed change (fixed)

Always call parseInt() with a radix as second argument

Reported by: sebastian Assignee: sebastian
Priority: P4 Milestone: Adblock-Plus-1.8.8-for-Chrome-Opera-Safari
Module: Platform Keywords: goodfirstbug
Cc: trev Blocked By:
Blocking: Platform: Unknown
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):



Most of the calls to parseInt() in the platform code only specify the first argument. However, different implementations behave differently in cases like parseInt('011'). So the radix should always be specified with the second argument, to eliminate reader confusion and to guarantee predictable behavior.

What to change

Change all calls of the form parseInt(string) to parseInt(string, 10).

Attachments (0)

Change History (3)

comment:1 Changed on 10/31/2014 at 02:53:59 PM by sebastian

  • Owner set to sebastian

comment:2 Changed on 10/31/2014 at 02:54:16 PM by sebastian

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:3 Changed on 11/04/2014 at 08:00:29 AM by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-Safari-next
  • Resolution set to fixed
  • Status changed from reviewing to closed

Add Comment

Modify Ticket

Change Properties
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from sebastian.
Note: See TracTickets for help on using tickets.