mirror of
https://github.com/danog/tgseclib.git
synced 2025-01-22 05:51:20 +01:00
Sometimes at php7 uniqid() return same result as their previous call. Here generates few equal labels wich makes error on eval. Does not know why uniqid() return same values but this is fact and my construction is more correct than previous. No need to call label id generation and use dirty goto :')
This commit is contained in:
parent
12f7358c67
commit
2fcc294cc6
@ -169,14 +169,11 @@ abstract class EvalBarrett extends Base
|
||||
return 'return [];';
|
||||
}
|
||||
|
||||
$label = 'label_' . uniqid();
|
||||
|
||||
$regular = '
|
||||
$length = count($' . $input . ');
|
||||
if (!$length) {
|
||||
$' . $output . ' = [];
|
||||
goto ' . $label . ';
|
||||
}
|
||||
}else{
|
||||
$' . $output . ' = array_fill(0, $length + ' . count($arr) . ', 0);
|
||||
$carry = 0;';
|
||||
|
||||
@ -224,9 +221,7 @@ abstract class EvalBarrett extends Base
|
||||
|
||||
$regular.= '$' . $output. '[++$k] = $carry; $carry = 0;';
|
||||
|
||||
$regular.= '}';
|
||||
|
||||
$regular.= $label . ':';
|
||||
$regular.= '}}';
|
||||
|
||||
//if (count($arr) < 2 * self::KARATSUBA_CUTOFF) {
|
||||
//}
|
||||
|
Loading…
x
Reference in New Issue
Block a user