Changeset 30484 for main/trunk/greenstone2/runtime-src
- Timestamp:
- 2016-04-26T19:22:56+12:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/runtime-src/src/recpt/formattools.cpp
r29042 r30484 1522 1522 text_t outtext; 1523 1523 1524 // Check if the string is empty. If it is, do not do anything 1525 if (intext.empty()) 1526 { 1527 outtext = intext; 1528 return outtext; 1529 } 1530 1524 1531 // decide if dealing with metadata or text 1525 1532 … … 1587 1594 if ((potential_quote == '\'') || (potential_quote == '\"')) { 1588 1595 --rhs_end; 1589 rhs_start = rscan_for(outstring,rhs_end-1,potential_quote) +1; 1596 // We have already decremented rhs_end, so we want to look at the current value for rhs_end (allows empty quoted strings) 1597 rhs_start = rscan_for(outstring,rhs_end,potential_quote) +1; 1590 1598 quoted = true; 1591 1599 } … … 1594 1602 } 1595 1603 1596 if ((rhs_end-rhs_start)<0) { 1604 // Allow empty quoted strings 1605 if ((rhs_end-rhs_start)<0 && !quoted) { 1597 1606 // no meaningful rhs expression 1598 1607 return false;
Note:
See TracChangeset
for help on using the changeset viewer.