Changeset 23635 for main/trunk
- Timestamp:
- 2011-01-25T18:15:15+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/runtime-src/src/recpt/querytools.cpp
r22984 r23635 407 407 query_no_brackets += substr(here, bracket); 408 408 // skip the :TI bits 409 while (*bracket != ' ' && bracket != end) { bracket++;} 409 while (bracket != end // do bracket != end test first, ELSE when bracket = end, we're past the string, in 410 && *bracket != ' ') { // which case *bracket becomes an invalid operation that causes the server to crash 411 bracket++; 412 } 410 413 here = bracket; 411 414 } … … 418 421 // back up the field name 419 422 text_t::const_iterator old_bracket = bracket; 420 while ( *bracket != ' ' && bracket != here) {421 --bracket; 423 while (bracket != here && *bracket != ' ') { // order of tests in condition matters (see long comment above) 424 --bracket; 422 425 } 423 426 if (bracket != here) {
Note:
See TracChangeset
for help on using the changeset viewer.