Fixed a possible segfault with empty loops in CTemplate introduced AND identified by BrianC.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1953 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
cflakes
2010-04-29 19:53:03 +00:00
parent 7d7106748e
commit bed30e9eb6
+1 -1
View File
@@ -442,7 +442,7 @@ bool CTemplate::Print(const CString& sFileName, ostream& oOut) {
bool bSort = (sArgs.Token(1).Left(4).Equals("SORT"));
vector<CTemplate*>* pvLoop = GetLoop(sLoopName);
if (bSort) {
if (bSort && pvLoop->size() > 1) {
CString sKey;
if(sArgs.Token(1).TrimPrefix_n("SORT").Left(4).Equals("ASC=")) {