From 9bfe711ef10a02db0cb63c7fcb797fbc0df705ab Mon Sep 17 00:00:00 2001
From: Brad King <brad.king@kitware.com>
Date: Thu, 17 May 2007 11:27:46 -0400
Subject: BUG: Fix ExpandListArgument when the string ends in a backslash.

---
 Source/cmSystemTools.cxx | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 3553259..41444ad 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1152,6 +1152,11 @@ void cmSystemTools::ExpandListArgument(const std::string& arg,
             {
             newArgVec.push_back(*c);
             }
+          else
+            {
+            // Terminate the loop properly.
+            --c;
+            }
           }
         } break;
       case '[':
-- 
cgit v0.12