summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show 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
165 { 165 {
166 in.getline( line, 1000 ); 166 in.getline( line, 1000 );
167 if ( in.eof() ) 167 if ( in.eof() )
168 continue; 168 break;
169 169
170 k[0] = '\0'; 170 k[0] = '\0';
171 v[0] = '\0'; 171 v[0] = '\0';
172 172
173 sscanf( line, "%[^:]: %[^\n]", k, v ); 173 if ( sscanf( line, "%[^:]: %[^\n]", k, v ) < 2 )
174 break;
175
174 key = k; 176 key = k;
175 value = v; 177 value = v;
176 key = key.stripWhiteSpace(); 178 key = key.stripWhiteSpace();