summaryrefslogtreecommitdiff
path: root/noncore
Side-by-side diff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/server.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/settings/aqpkg/server.cpp b/noncore/settings/aqpkg/server.cpp
index 04f5ab7..06b0863 100644
--- a/noncore/settings/aqpkg/server.cpp
+++ b/noncore/settings/aqpkg/server.cpp
@@ -165,12 +165,14 @@ void Server :: readPackageFile( Server *local, bool clearAll, bool installingToR
{
in.getline( line, 1000 );
if ( in.eof() )
- continue;
+ break;
k[0] = '\0';
v[0] = '\0';
- sscanf( line, "%[^:]: %[^\n]", k, v );
+ if ( sscanf( line, "%[^:]: %[^\n]", k, v ) < 2 )
+ break;
+
key = k;
value = v;
key = key.stripWhiteSpace();