Ошибочная обработка диапазона

Bug #998780 reported by Alexander Rudenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cc2regex
Fix Committed
High
Alexander Rudenko

Bug Description

Диапазоны, в которых первое число начинается с 0, обрабатываются неправильно при создании списка.
Недоработка есть и в функции создания списка, и в regexcreate.
Пример 1.1:
./createqueue.php 01 10
...
        (
            [0] => 01
            [1] => 9
            [2] => 10
            [3] => 10
        )
...
ERROR, BAD NUMBERS: 01 9

Пример 1.2:
./regexcreator.php 01 10
...
ERROR, BAD NUMBERS: 1 10

Пример 2.1:
./createqueue.php 011 112
...
        (
            [0] => 011
            [1] => 11
            [2] => 12
            [3] => 19
            [4] => 20
            [5] => 99
            [6] => 100
            [7] => 109
            [8] => 110
            [9] => 112
        )

Пример 2.2:
./regexcreator.php 011 111
Minumum: 11 Maximum: 111
Minumum: integer Maximum: integer

ERROR, BAD NUMBERS: 11 111

Related branches

Revision history for this message
Alexander Rudenko (rudenko) wrote :

Варианты:
1. перед обработкой чисел, начинающихся с 0, отрезать слева нули, потом прибававлять к полученным.
+ обнаружен замкнутый цикл при обработке числа 0 (00, 000).
+ возможно, стоит отказаться от gmp.

Revision history for this message
Alexander Rudenko (rudenko) wrote :

Исправлено в ревизии 22: http://bazaar.launchpad.net/~rudenko/cc2regex/trunk/revision/22

Changed in cc2regex:
status: New → Fix Committed
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
Changed in cc2regex:
assignee: nobody → Alexander Rudenko (rudenko)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.