Explorar el Código

Fix field-without-values appearing at end of file.

Jay Freeman (saurik) hace 9 años
padre
commit
4f1e54bea1
Se han modificado 1 ficheros con 1 adiciones y 3 borrados
  1. 1 3
      apt-pkg/tagfile.cc

+ 1 - 3
apt-pkg/tagfile.cc

@@ -276,10 +276,8 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength,bool const Su
 	 // find the beginning of the value
 	 Stop = Colon + 1;
 	 for (; Stop < End && isspace_ascii(*Stop) != 0; ++Stop)
-	    if (*Stop == '\n' && Stop[1] != ' ')
+	    if (*Stop == '\n' && (Stop+1 == End || Stop[1] != ' '))
 	       break;
-	 if (Stop >= End)
-	    return false;
 	 lastTagData.StartValue = Stop - Section;
       }