[PATCH]: wpa_gui-qt4: correct check of pos value returned from indexOf()

Kel Modderman kel
Wed Jan 30 18:57:03 PST 2008


Correctly check the value of pos returned by indexOf() + 1. pos will be < 1
if equals field separator wasn't present in current string.

This patch depends on the last of the 3 patch series sent previously.

Signed-off-by: Kel Modderman <kel at otaku42.de>
---
--- a/wpa_supplicant/wpa_gui-qt4/scanresults.cpp
+++ b/wpa_supplicant/wpa_gui-qt4/scanresults.cpp
@@ -79,7 +79,7 @@
 		for (QStringList::Iterator it = lines.begin();
 		     it != lines.end(); it++) {
 			int pos = (*it).indexOf('=') + 1;
-			if (!pos)
+			if (pos < 1)
 				continue;
 
 			if ((*it).startsWith("bssid="))
---



More information about the Hostap mailing list