mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 01:15:38 -04:00
[machineid] Drop trailing \n, toInt() doesn't like it
This commit is contained in:
parent
9e359c98a9
commit
642dbf449c
1 changed files with 5 additions and 1 deletions
|
@ -81,6 +81,10 @@ getUrandomPoolSize()
|
||||||
QByteArray v = f.read( 16 );
|
QByteArray v = f.read( 16 );
|
||||||
if ( v.length() > 2 )
|
if ( v.length() > 2 )
|
||||||
{
|
{
|
||||||
|
if ( v.endsWith( '\n' ) )
|
||||||
|
{
|
||||||
|
v.chop(1);
|
||||||
|
}
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
poolSize = v.toInt( &ok );
|
poolSize = v.toInt( &ok );
|
||||||
if ( !ok )
|
if ( !ok )
|
||||||
|
@ -89,7 +93,7 @@ getUrandomPoolSize()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return poolSize >= minimumPoolSize ? poolSize : minimumPoolSize;
|
return (poolSize >= minimumPoolSize) ? poolSize : minimumPoolSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
Calamares::JobResult
|
Calamares::JobResult
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue