abi detection: use four byte for four byte magic strings

This commit is contained in:
hjk
2011-03-02 17:17:07 +01:00
parent e293e467d2
commit b37cd3325c

View File

@@ -118,7 +118,7 @@ static QList<Abi> abiOf(const QByteArray &data)
} else {
// Windows PE
// Windows can have its magic bytes everywhere...
int pePos = data.indexOf("PE\0\0");
int pePos = data.indexOf(QByteArray("PE\0\0", 4));
if (pePos >= 0 && pePos + 72 < data.size()) {
Abi::Architecture arch = Abi::UnknownArchitecture;
Abi::OSFlavor flavor = Abi::UnknownFlavor;