From 67c8724090bb290b59d806ae75b4e7e31e2e2faa Mon Sep 17 00:00:00 2001 From: ziree Date: Thu, 12 Jan 2012 14:06:07 +0100 Subject: [PATCH] Better parsing for comments and empty lines in AO notecards --- indra/newview/aoengine.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/indra/newview/aoengine.cpp b/indra/newview/aoengine.cpp index eb512c40c8..c92a2da94a 100644 --- a/indra/newview/aoengine.cpp +++ b/indra/newview/aoengine.cpp @@ -1484,10 +1484,14 @@ void AOEngine::parseNotecard(const char* buffer) if(index==lines.size()-1) line=line.substr(0,line.size()-1); - if( line.size() > 0 && line[0] == '#' ) // FIRE-3801; skip comments to reduce spam to local chat. + LLStringUtil::trim(line); + + if(line.empty()) + continue; + + if(line[0]=='#') // FIRE-3801; skip comments to reduce spam to local chat. continue; - LLStringUtil::trim(line); if(line.find("[")!=0) { LLSD args;