From kde-commits Fri Oct 31 22:43:35 2003 From: David Faure Date: Fri, 31 Oct 2003 22:43:35 +0000 To: kde-commits Subject: Re: kdelibs/kdecore X-MARC-Message: https://marc.info/?l=kde-commits&m=106764554100856 On Friday 31 October 2003 23:05, Oswald Buddenhagen wrote: > @@ -1785,5 +1785,5 @@ void KURL::setDirectory( const QString & > void KURL::setQuery( const QString &_txt, int encoding_hint) > { > - if (_txt.length() && (_txt[0] =='?')) > + if (_txt[0] == '?') > _setQuery( _txt.mid(1), encoding_hint ); > else Why? Isn't this going to go out-of-bounds with an empty string in _txt? -- David Faure -- faure@kde.org, dfaure@klaralvdalens-datakonsult.se Qt/KDE/KOffice developer Klarälvdalens Datakonsult AB, Platform-independent software solutions