comparison C++/Parser.cpp @ 224:ca69910b1407

Parser: add tests (and fix #270)
author David Demelier <markand@malikania.fr>
date Fri, 09 May 2014 09:15:52 +0200
parents 3b0e276f0866
children
comparison
equal deleted inserted replaced
223:c6513d9c696b 224:ca69910b1407
142 142
143 if (epos > 0) { 143 if (epos > 0) {
144 size_t i, begin, last; 144 size_t i, begin, last;
145 char c; 145 char c;
146 146
147 key = line.substr(0, epos - 1); 147 key = line.substr(0, epos);
148 value = line.substr(epos + 1); 148 value = line.substr(epos + 1);
149 149
150 // clean option key 150 // clean option key
151 for (i = 0; !isspace(key[i]) && i < key.length(); ++i) 151 for (i = 0; !isspace(key[i]) && i < key.length(); ++i)
152 continue; 152 continue;