diff --git a/src/modules/machineid/Workers.cpp b/src/modules/machineid/Workers.cpp index 6b55f2489..e6379f3f1 100644 --- a/src/modules/machineid/Workers.cpp +++ b/src/modules/machineid/Workers.cpp @@ -81,6 +81,10 @@ getUrandomPoolSize() QByteArray v = f.read( 16 ); if ( v.length() > 2 ) { + if ( v.endsWith( '\n' ) ) + { + v.chop(1); + } bool ok = false; poolSize = v.toInt( &ok ); if ( !ok ) @@ -89,7 +93,7 @@ getUrandomPoolSize() } } } - return poolSize >= minimumPoolSize ? poolSize : minimumPoolSize; + return (poolSize >= minimumPoolSize) ? poolSize : minimumPoolSize; } Calamares::JobResult